I use the following PHP code to create a CSV file:
header("Expires: 0"); header("Cache-control: private"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Description: File Transfer"); header("Content-Type: text/csv"); header("Content-disposition: attachment; filename=site_list.csv");
The CSV file is generated successfully in all browsers. But the file created by IE when opened in MS Excel shows all the data in one line.
PS:
- Files created by other browsers (FF, Google Chrome) behave perfectly.
- I use "\ n" for line breaks.
- Using "\ r \ n" does not help
source share