Why Excel Alignment Changes When Converting XLSX to CSV
Question details
The user experiences inconsistent cell alignment when saving an Excel XLSX workbook as a UTF-8 CSV file, and alignment adjustments are not preserved after saving.
- Product
- Excel
- Device & OS
- not provided
- Scenario
- Converting an XLSX workbook containing numeric and text data to a UTF-8 CSV file format.
- Observed behavior
- Numbers in a single column display inconsistently, with some left-aligned and others right-aligned. Alignment changes made in the CSV or the original XLSX file do not persist upon saving and reopening.
Keep in mind that CSV (Comma-Separated Values) files are plain-text formats that only store raw data and cannot save visual formatting like cell alignment, fonts, colors, or borders.
Understand CSV Limitations and Default Display Behavior
Learn how Excel automatically interprets and aligns plain-text CSV data without saving visual formatting.
Because CSV files do not retain formatting, any visual alignment adjustments made in the file will be lost the moment you save and close it. This is expected behavior for all plain-text formats.
When Excel opens a CSV file, it relies on default display rules based on how it interprets the raw data. Properly formatted numbers are automatically right-aligned, while text strings are left-aligned. If your column contains a mix of both types, the alignment will look inconsistent.
Click on the left-aligned numbers in your CSV file and look for a small green triangle in the corner of the cell, which indicates the number is being stored and read as text.
Remove Nonprinting Characters Using the CLEAN Function
Use the CLEAN formula to strip invisible characters that force numbers to be interpreted as left-aligned text.
Manage and Clean CSV Files Effectively with WPS Spreadsheet
WPS Spreadsheet provides excellent compatibility with Excel formats and CSV files, offering easy-to-use data cleaning tools to ensure your numbers and text are perfectly standardized before export.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your XLSX workbook or CSV file directly.
- 2. Standardize your data types: Highlight the inconsistent column and navigate to the Data tab. Use the 'Text to Columns' feature to quickly convert text-formatted numbers back into standard numeric formats.
- 3. Export without errors: Click 'Save As' and choose CSV, confident that your raw values have been properly standardized without hidden formatting issues.

Frequently Asked Questions
Can I force a CSV file to save text alignment?
No. CSV stands for Comma-Separated Values, which is strictly a plain-text format. It only stores the raw data and delimiters, making it technically impossible to save any visual formatting like alignment, cell colors, or bold text.
Why do some numbers in my CSV open as text?
Numbers are typically treated as text if they contain invisible nonprinting characters, leading spaces, or if the software imports them using a specific text qualifier. Spreadsheet applications default to left-aligning text.
How can I keep my formatting intact when saving?
If you need to preserve text alignment, highlights, or formulas, you must save your document in a dedicated spreadsheet format such as XLSX or XLS, rather than plain-text CSV.




