'What to set as mimetype for CSV files to open in spreadsheet applications
My application lets users download their data as CSV files. These are supposed to open in spreadsheet applications. On a Linux system, I get prompted correctly to open with OpenOffice, but some of my users complain that when they download the file, it does not open automatically Excel, but asks them to choose the application. When they download a CSV from some other site, it opens correctly in Excel.
I am setting:
mimetype: text/csv
content_disposition: attachment; filename.csv
Solution 1:[1]
You can define the separator in first line of your CSV file using sep so that it appears as follows:
sep=;
See also @FilipNavara's answer.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Bender the Greatest |
