I\'m developing a part of an application that\'s responsible for exporting some data into CSV files. The application always uses UTF-8 because of its multilingual nature at
Had the same problems with PHP-generated CSV files.
Excel ignored the BOM when the Separator was defined via "sep=,\n"
at the beginning of the content (but of course after the BOM).
So adding a BOM ("\xEF\xBB\xBF"
) at the beginning of the content and setting the semicolon as separator via fputcsv($fh, $data_array, ";");
does the trick.