Forum Discussion

SelinaKnow's avatar
SelinaKnow
Iron Contributor
Nov 09, 2026

How do you stop Excel from removing leading zeros?

When opening a CSV in Excel, product codes such as “00125” can become “125.” This causes problems when matching them against the original records.

What’s the simplest way to preserve leading zeros, especially when sharing the CSV with colleagues who open it by double-clicking?

2 Replies

  • Terio's avatar
    Terio
    Brass Contributor

    When you're importing csv files, use the format text for this fields or, better, use Power Query to import and transform datas.

    Bye

  • Here's the full article how to stop automatic data conversations when opening CSV-files:

    https://support.microsoft.com/en-us/excel/set-automatic-data-conversions

    Note: The option to stop this conversation is only availbe in Excel 2024 and above!

    Do not share CSV files with people who do not understand to import data correctly, share the data as Excel file. In previous versions you must import the CSV file using Data \ From File \ From CSV and transform the data to preserve the numbers as text.

    Andreas.