Open csv attachment
I have a somewhat crazy problem. I've switched our office users from Outlook to Thunderbird. Now, when they go to open a .csv attachment, they get the message: "You have chosen to open: thisFile.csv which is Text Document (2.3KB). What should Thunderbird do with this file?" I then get a drop-down list which defaults to 'Notepad', and nowhere in this suggested list is Excel. I can choose 'Other', which brings up an expanded list, also not including Excel. I can click 'browse' and search to Excel.exe and select it, but when it opens, it does not open it as a csv -- it has only one column with the entire line, no columns delimited on commas.
When I look at Tools > Options > Attachments > Incoming, I have a new entry: "Text Document", Content Type: text/plain: txt, Use Microsoft Excel.
This is a HUGE problem. Staff open csv spreadsheets all the time. What can I do?
தீர்வு தேர்ந்தெடுக்கப்பட்டது
Matt - yes, we eventually plan on going to LibreOffice. This particular issue is reported in 2 bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=300168 https://bugzilla.mozilla.org/show_bug.cgi?id=587869
However, I've found a work-around. As noted, the problem is when a mail client marks the attachment as Text/Plain. Outlook handles csv attachments correctly (open in Excel) because Excel is a Microsoft product, so it presumably "just knows". To fix this for Thunderbird, the client must send the csv attachment as "Content-Type: application/vnd.ms-excel". Thunderbird, as a client, DOES do this (so does Outlook). And csv attachments sent from Thunderbird are correctly opened in Excel by the recipient's Thunderbird client.
I am using mail(x). To make this work with the mailx client, the following entry must exist in /etc/mime.types:
application/vnd.ms-excel csv
That did the trick for me. Other clients (e.g. mutt), also have mime.type settings.
Read this answer in context 👍 0All Replies (2)
CSV is a plain text document. There is no changing that. It is not as you describe a spreadsheet. I see it all the time used as a database format.
The total failure of Excel to correctly interpret it is probably due to it not coping with Unicode text documents. I have notice on other occasions that files written by excel are not in unicode but in ANSI. I am not quite sure what is wrong with the folks at Redmond. They converted windows to unicode a decade ago and since then unicode has become the default encoding in email.
Doing a little Googling on the subject makes it obvious Excel is the issue. Much discussion surrounding the following type procedure to work around this limitation of excel.
- Save the exported file as a csv
- Open Excel
- Import the data using Data-->Import External Data --> Import Data
- Select the file type of "csv" and browse to your file
- In the import wizard change the File_Origin to "65001 UTF" (or choose correct language character identifier)
- Change the Delimiter to comma
- Select where to import to and Finish
Personally I use Libreoffice. It has no trouble with CSV. in UTF format. So perhaps that s the way to go.
தீர்வு தேர்ந்தெடுக்கப்பட்டது
Matt - yes, we eventually plan on going to LibreOffice. This particular issue is reported in 2 bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=300168 https://bugzilla.mozilla.org/show_bug.cgi?id=587869
However, I've found a work-around. As noted, the problem is when a mail client marks the attachment as Text/Plain. Outlook handles csv attachments correctly (open in Excel) because Excel is a Microsoft product, so it presumably "just knows". To fix this for Thunderbird, the client must send the csv attachment as "Content-Type: application/vnd.ms-excel". Thunderbird, as a client, DOES do this (so does Outlook). And csv attachments sent from Thunderbird are correctly opened in Excel by the recipient's Thunderbird client.
I am using mail(x). To make this work with the mailx client, the following entry must exist in /etc/mime.types:
application/vnd.ms-excel csv
That did the trick for me. Other clients (e.g. mutt), also have mime.type settings.