Data Import & Export

How to Stop Excel from Changing CSV Values to Dates (e.g., 1-08)

Camila MilosovichCamila Milosovich Nov 11, 2026 869 views

Question details

The user needs to import a CSV file into Excel without text values (like '1-08') being automatically converted into dates (like '8-Jan').

How to Preserve Text Values Like 1-08 When Importing CSV into Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Importing raw CSV data into a spreadsheet for analysis without losing the original text formatting due to auto-formatting features.
Observed behavior
Excel automatically converts specific text strings containing hyphens or slashes (such as '1-08') into date formats, altering the original CSV data.
Before you start

Ensure you have the original CSV file saved locally. Do not double-click the CSV file to open it directly in Excel, as this immediately triggers the automatic date conversion.

Solution 1Recommended

Import CSV Using Power Query (Recommended)

The most reliable method to prevent Excel from converting text to dates is to import the CSV via Power Query and define the column data type as Text before loading it into your worksheet.

By utilizing Excel's Get & Transform Data (Power Query) feature, you can intercept the data before it loads onto the grid. This allows you to remove Excel's automatic type-guessing step and explicitly tell the application to treat specific columns as plain text.

1
Open the Data Import Wizard

Open a blank Excel workbook, go to the 'Data' tab on the top ribbon, and click on 'From Text/CSV' in the Get & Transform Data group.

2
Select the CSV File

Locate the CSV file on your computer, select it, and click 'Import'. A preview window will appear.

3
Transform the Data

At the bottom of the preview window, click 'Transform Data' (do not click 'Load'). This will open the Power Query Editor.

4
Remove Automatic Type Changes

In the Power Query Editor, look at the 'Applied Steps' pane on the right side. Click the 'X' next to the 'Changed Type' step to delete it. This stops Excel's automatic formatting.

5
Format Column as Text

Select the column containing your specific values (e.g., 1-08). Right-click the column header, choose 'Change Type', and select 'Text'. When prompted, choose 'Replace current'.

6
Load the Data

Click the 'Close & Load' button in the top-left corner of the Power Query Editor. Your CSV data will now appear in your spreadsheet exactly as it was in the original file.

Import CSV Using Power Query (Recommended)
Data Integrity Maintained: Using Power Query ensures your data remains exactly as it appears in the original CSV file, completely eliminating the need to manually insert leading apostrophes.
WPS Spreadsheet Solution

Easily Import CSV Data as Text Using WPS Spreadsheet

WPS Office provides an intuitive Text Import Wizard that allows you to specify column data formats during the import process, giving you full control over your CSV files and easily preventing text from turning into dates.

  1. 1. Open the Import Tool: Launch WPS Spreadsheet, navigate to the 'Data' tab, and click on 'Import Data'.
  2. 2. Select Data Source: Choose 'Import Data' again from the drop-down menu, select 'Select Data Source', and browse to find your CSV file.
  3. 3. Choose Delimiters: In the Text Import Wizard, select 'Delimited' and click 'Next'. Check the appropriate delimiters (usually Comma for CSV files) and click 'Next'.
  4. 4. Set Column Data Format: In the 'Data Preview' section, click on the column header that contains your '1-08' values. Then, under 'Column data format', select 'Text'.
  5. 5. Finish the Import: Click 'Finish' and choose where you want to place the data. The values will import exactly as they are without converting to dates.
Intuitive Text Import Wizard for full control over CSV data.Highly compatible with all Microsoft Excel file formats (.xlsx, .csv, .xls).Lightweight and completely free to use for daily spreadsheet tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel automatically convert numbers with hyphens to dates?

Excel is designed to automatically detect dates to save users time during data entry. When it sees patterns like '1-08' or '1/8', it assumes you are entering a date (January 8th or August 1st) and applies standard date formatting by default.

Can I just add a single quote before the numbers in my CSV?

While adding a leading apostrophe (e.g., '1-08) forces Excel to treat the entry as text, doing this manually for large datasets in a CSV file is time-consuming and alters the raw text data. Using Power Query is a much cleaner and more efficient approach.

How do I fix values that have already been converted to dates?

Once Excel converts a text string to a date and you save the file, the underlying data is permanently changed to a date serial number. You cannot simply reformat the cells to text to get the old value back; you must re-import the original CSV file using the correct Text format method to recover the original strings.

Does this Power Query method work on Mac?

Yes, modern versions of Excel for Mac include Power Query functionality. You can access it via Data > Get Data (Power Query) > From Text/CSV to perform the exact same transformation steps and prevent date conversion.