Create UTF-8 CSV or Text Files from Excel Without Losing Accents
Question details
Create a UTF-8 CSV or text file from Excel data while preserving accented characters for import into SPSS.

- Product
- Microsoft Excel 2016 and IBM SPSS Statistics
- Device & OS
- not provided
- Scenario
- Export data from a source database through Excel and import it into SPSS without character or date-format errors.
- Observed behavior
- Excel Unicode Text may be UTF-16LE, while standard CSV may use a legacy code page. Accented characters can also be damaged in the source data before Excel receives them.
Check accented names in the source database and in Excel before exporting; changing the encoding cannot restore characters that are already damaged. If a database CSV is incorrect, export directly to XLSX and verify the characters again.
Convert Excel Unicode Text to UTF-8
Use this method when a tab-delimited text file is acceptable and Excel does not offer a UTF-8 export option.
In Excel, open the verified workbook and choose File > Save As. Select Unicode Text (*.txt) and save the active worksheet.
In VS Code, choose File > Open File and open the exported TXT file. Check that accented characters appear correctly.
Click the encoding label in the VS Code status bar, select Save with Encoding, and choose UTF-8.
In SPSS, choose File > Import Data > Text Data, select the TXT file, and specify UTF-8 and a tab delimiter in the import settings. Check the preview and set date formats before completing the import.
Export a UTF-8 CSV through Google Sheets
Use Google Sheets when you need a comma-separated CSV and have a verified XLSX file.
Use Excel's CSV UTF-8 format when available
Use the built-in UTF-8 CSV option if it appears in your version of Excel.
Export spreadsheet data as UTF-8 CSV with WPS Office
Open your verified workbook in WPS Spreadsheet and save the active sheet as UTF-8 CSV when that format or encoding is available. If your version does not offer it, use a Unicode-preserving conversion method instead of a legacy CSV export.
- 1. Open the workbook: In WPS Spreadsheet, choose Open and select the verified XLSX file. Check that accented characters display correctly.
- 2. Choose CSV export: Select the worksheet you need, then choose Menu > Save As and look for a CSV UTF-8 format or a UTF-8 encoding option.
- 3. Save and check the file: If UTF-8 is available, select it and save the CSV. Open the file in a text editor to verify the characters; if the option is unavailable, use the Excel Unicode Text conversion or Google Sheets method above.
- 4. Import into SPSS: In SPSS, choose File > Import Data > Text Data, select the CSV, and specify UTF-8 and the appropriate delimiter. Review the date fields in the import preview.

Frequently Asked Questions
Why are accented characters already wrong in Excel?
The source database export may have used an incompatible character set. Check the names in the database, export directly to XLSX if possible, and verify them in Excel before creating a text file.
Can I fix question marks in names by saving the file as UTF-8?
No. UTF-8 can preserve characters that are still correct, but it cannot reconstruct characters already replaced by question marks. Return to the source data and export it again.
Is Excel Unicode Text the same as UTF-8 CSV?
No. Excel Unicode Text is typically UTF-16LE and tab-delimited. Convert it to UTF-8 in a text editor and import it as tab-delimited text, not as comma-separated CSV.
How do I prevent dates from changing during the SPSS import?
In the SPSS text import settings, review the date columns and assign formats that match the source values. Pay particular attention to dates where the day and month could be interpreted either way.




