I have a Java app which reads CSV files which have been created in Excel (e.g. 2007). Does anyone know what charset MS Excel uses to save these files in?
I would have guessed either:
but I am unable to decode extended chars (e.g. french accentuated letters) using either of these charset types.
UTF-8 Encoding in Microsoft Excel (Windows) Click File in the top-left corner of your screen. Click the drop-down menu next to File format. Select CSV UTF-8 (Comma delimited) (. csv) from the drop-down menu.
In Excel 2016 and later versions, you can save a file in the CSV format with UTF-8 encoding directly: In the target worksheet, click File > Save As or press the F12 key. In the Save As dialog box, select CSV UTF-8 (comma delimited) (*. csv) from the Save as type drop down.
Click File > Save As. You will see the Save dialog box. Via the File Format dropdown menu, select the CSV UTF-8 option. Click Save.
In Microsoft Excel, workbooks are saved as Excel Workbooks (. xlsx) by default. You can change the default file format to any other file format that is supported in Excel. For example, if you frequently create macros in a workbook, you may want to automatically save a new workbook as an Excel Macro-Enabled Workbook (.
From memory, Excel uses the machine-specific ANSI encoding. So this would be Windows-1252 for a EN-US installation, 1251 for Russian, etc.
CSV files could be in any format, depending on what encoding option was specified during the export from Excel: (Save Dialog, Tools Button, Web Options Item, Encoding Tab)
UPDATE: Excel (including Office 2013) doesn't actually respect the web options selected in the "save as..." dialog, so this is a bug of some sort. I just use OpenOffice Calc now to open my XLSX files and export them as CSV files (edit filter settings, choose UTF-8 encoding).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With