This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Open csv attachment

  • 2 پاسخ
  • 1 has this problem
  • 2 views
  • آخرین پاسخ توسّط Mark Foley

more options

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?

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?

Chosen solution

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 👍 0

All Replies (2)

more options

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.

  1. Save the exported file as a csv
  2. Open Excel
  3. Import the data using Data-->Import External Data --> Import Data
  4. Select the file type of "csv" and browse to your file
  5. In the import wizard change the File_Origin to "65001 UTF" (or choose correct language character identifier)
  6. Change the Delimiter to comma
  7. 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.

more options

Chosen Solution

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.