Quantcast
Viewing latest article 16
Browse Latest Browse All 35

Answer by Ixtlilton for Is it possible to force Excel recognize UTF-8 CSV files automatically?

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.


Viewing latest article 16
Browse Latest Browse All 35

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>