Fix Excel Losing Text Formatting When Saving as CSV
Question details
Users need a way to stop Excel from removing text formatting and altering large numbers into scientific notation when saving and reopening a CSV file.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Saving a spreadsheet that contains specifically formatted text, leading zeros, or long strings of numbers into the CSV file format and then reopening it.
- Observed behavior
- Cell formatting is entirely lost, and long numerical values are automatically converted and displayed in General format or scientific notation (e.g., 2.54E+11).
Before importing the data into a new workbook, ensure the CSV file is completely closed. If the CSV is currently open in Excel or another application, the import tool may fail to access the file.
Import CSV Using Power Query to Preserve Formatting
Use Excel's 'Get Data' feature to define the exact data type for each column during the import process, preventing automatic conversion to scientific notation.
Because CSV files do not store formatting data, double-clicking to open them forces Excel to guess the data types. Importing the file manually allows you to explicitly set problematic columns as Text.
Open a new, blank workbook in Excel. Go to the 'Data' tab on the ribbon, click on 'Get Data', select 'From File', and then choose 'From Text/CSV'.
Locate the CSV file you want to open in the file browser, select it, and click the 'Import' button.
A preview window will appear. Do not click Load immediately. Instead, click 'Transform Data' to open the Power Query Editor.
Select the column or columns that are losing formatting (like tracking numbers or IDs). Click the data type icon in the column header (usually '123' or 'ABC') and change it to 'Text'. Confirm by clicking 'Replace current' if prompted.
Once the formatting looks correct in the preview, click 'Close & Load' in the top-left corner to bring the correctly formatted data into your worksheet.

Verify Saved Values in a Plain Text Editor
Check the raw data in a text editor to confirm whether the formatting was actually lost during saving or if it is just a display issue when Excel reopens the file.
Save as an Excel Workbook (XLSX)
If you do not strictly need a CSV file for a third-party application, save your file in a native Excel format to inherently protect all formatting, colors, and data types.
Handle CSV Imports Easily with WPS Spreadsheet
WPS Office provides a highly compatible and user-friendly Spreadsheet application that includes a straightforward Text Import Wizard, allowing you to easily define text columns and prevent formatting loss for free.
- 1. Open the Data tab: Launch WPS Spreadsheet, open a blank workbook, and navigate to the 'Data' tab on the top ribbon.
- 2. Import your CSV file: Click 'Import Data', select 'Import Data' from the dropdown, and browse for your CSV file.
- 3. Follow the Text Import Wizard: Choose 'Delimited' and proceed. Select 'Comma' as your delimiter to correctly separate your columns.
- 4. Set column data format to Text: In the final step of the wizard, click on the column preview containing your long numbers and change the 'Column data format' from General to 'Text'. Click Finish to safely import your data.

Frequently Asked Questions
Why do my long numbers appear as scientific notation (like 2.54E+11) in a CSV?
CSV files are plain text documents that cannot save column formatting rules. When you open a CSV by double-clicking it, Excel defaults all cells to the 'General' format. This automatically triggers Excel to display any number exceeding 11 digits in scientific notation to save space on the screen.
Does a CSV file save cell colors, fonts, or borders?
No. CSV (Comma Separated Values) only stores the raw text and data separated by commas. It automatically strips away all visual elements, including cell colors, bold text, borders, and custom cell widths.
How can I permanently save my text formatting?
If you want to maintain specific text formatting, colors, and layout configurations, you must save your file using a native spreadsheet format, such as an Excel Workbook (.xlsx) or WPS Spreadsheet format, rather than as a CSV.




