How to Fix Excel for Mac Saving UTF-8 CSV Files Without Trailing Line Breaks
Question details
The user needs to resolve missing trailing line breaks in UTF-8 CSV files saved by Excel for Mac before concatenating multiple CSV files.

- Product
- Microsoft Excel for Mac
- Device & OS
- macOS Catalina 10.15.4
- Scenario
- The user creates simple three-column CSV files in Excel for Mac and concatenates them with a script. The missing final newline causes the last row of one file and the first row of the next file to merge.
- Observed behavior
- Excel for Mac saves UTF-8 CSV files without a final newline, so concatenated files merge the last and first rows into a single row.
Open one exported CSV file in a plain text editor such as Atom, Visual Studio Code, or TextEdit, and place the cursor after the final character to check whether the file ends on a new empty line. This confirms whether the missing trailing newline is present before you resave any files.
Verify and Resave UTF-8 CSV Files in a Text Editor
Use this solution when concatenated CSV rows are merged, or when you need to confirm whether Excel for Mac omitted the final newline before processing the files.
Excel for Mac sometimes omits the final line ending when exporting a CSV as UTF-8. Resaving the file in a plain text editor is the fastest way to add the missing newline without changing the CSV structure.
Open Atom, Visual Studio Code, or another UTF-8-capable plain text editor. Use File > Open and select the CSV file that was exported from Excel for Mac.
Place the cursor directly after the last character in the final row. If the cursor appears on a new empty line below the final row, the trailing newline exists; if it remains on the same line, the newline is missing.
Choose File > Save As or Save with Encoding, select UTF-8 as the encoding, and save the file. Repeat this for every CSV file before running your concatenation command.

Test CSV Export in a New macOS User Profile
Use this when newly exported files still lack the final newline and you want to isolate whether the current macOS account or Excel preferences are responsible.
Use WPS Office to Work with CSV Files Without Excel for Mac UTF-8 Newline Issues
WPS Office is a free, lightweight Office suite that opens, edits, and saves CSV files with reliable UTF-8 text handling and familiar spreadsheet tools. It supports Microsoft Excel formats, so you can migrate CSV, XLSX, and other workbook files without losing rows, formulas, or formatting.

Frequently Asked Questions
How do I check whether a CSV file ends with a trailing newline on Mac?
Open the CSV in a plain text editor such as Atom, Visual Studio Code, or TextEdit, place the cursor after the last character, and see whether it sits on a new empty line. You can also run `tail -c 1 file.csv | xxd` in Terminal; a final `0a` byte means the file ends with a newline.
Why does concatenating two CSV files produce a merged row?
If the first CSV file does not end with a newline, the first row of the second file is appended directly to the last row of the first file. Resave each CSV as UTF-8 from a plain text editor to add the line break before concatenating.
Can I fix this without reinstalling or updating Excel for Mac?
Yes. Open the affected CSV files in a text editor and resave them as UTF-8. If you need to rule out your profile, create a new macOS user and test a fresh CSV export from Excel.
Does WPS Office save CSV files with proper UTF-8 line breaks?
WPS Office can open, edit, and save CSV files with UTF-8 text handling, and it is a free alternative for working with spreadsheets if the Excel for Mac behavior disrupts your workflow.
Will resaving a CSV file in TextEdit change the data or encoding?
When you save as plain text and explicitly choose UTF-8, the cell content remains intact. Avoid rich text formats because they can add formatting and break CSV structure.




