Open csv files in text editor and xls(x) files in Excel
Hi,
Thunderbird tries to treat csv files and excel files as the same kind of file and loves to open both in excel. Excel is OK for Excel files, but I'd love to open csv files always in my text editor (vim), as I need to see the raw data, not what excel thinks of it. Is there a way to teach thunderbird the difference?
Thank you for your help Sven
ყველა პასუხი (6)
Tools/Options/Attachments/Incoming, select the line for Content Type csv, then click the Action drop-down, select Use other..., then select your text editor if it's on the list, or Browse... to the executable.
Hi,
it would be nice, if it were so simple, but Thunderbird recognizes most CSV-Files as Microsoft Excel-Arbeitsblatt (Microsoft Excel Worksheet), so this doesn't work. Thank you very much for your help, though!
How are the CSV files encoded in the email? Open the source of the email (Ctrl+U) and search for text/csv. is it found, proceeded by Content-Type: If it is not found search for Content-Type: and see what is being used to encode the CSV file. perhaps application/vnd.ms-excel. or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This is my incoming attachments pane. See the mime types in pale grey and the separations of CSV, XLS and other Excel formats.
When in doubt, delete the entry in the list with the delete key. then restart Thunderbird and open an attachment. If you are not asked what to do with the file your issue is the operating system file associations.
The forum reports you are posting with Windows 7, so these instructions of changing windows 7 file associations may help. https://support.microsoft.com/en-au/help/18539/windows-7-change-default-programs
Hi Matt,
thank you for your help.
This is one such header: --_----------=_1513815302208611 Content-Disposition: attachment; filename="2017-12-21_Neue_Werte.csv" Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name="2017-12-21_Neue_Werte.csv"
I tried deleting the Excel entries and the csv entry but it still recognizes csv-files as Excel-Worksheets. In Explorer a double click on a csv opens vim es wanted.
Thank you very much Sven
The emails are simply incorrectly encoded, so Thunderbird has no real idea what to do with the attachment.
IANA is fairly clear when it states, "The "octet-stream" subtype is used to indicate that a body contains arbitrary binary data. (1) By it's very definition a CSV file stores things as plain text. Hence your desire to open them in a text editor.the encoding being applied by the sender is just wrong.
My personal opinion is the developer that created the app generating the email simply had no idea, but I really do not know how that will help you fix the problem. The only thing I can suggest is make sure Thunderbird does not have a handler (other than ask) of the application/octet stream mime type and hopefully you can select the application of your choice or the operating systems.
In cases where the attachment is incorrectly encoded by the sender's email program, it's often possible to set the proper attachment handling by having TB receive an attachment sent by another service such as gmail or hotmail, or even TB itself.
For example, I sent a csv attachment to myself through TB and it displays the following source:
Content-Type: text/plain; charset=UTF-8; name="list2.csv" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="list2.csv"
When I right-click the csv, Open, I get the window shown in the picture below. To have the setting saved in Options, check the box 'Do this automatically...'. When the box is greyed out, it's an indication the attachment was incorrectly encoded.