CSV to Excel Conversion: Why Opening a CSV in Excel Corrupts Your Data
You double-click a CSV file. Excel opens it. Everything looks fine until you notice that your zip codes starting with 0 are now just four-digit numbers. Your product IDs that look like dates have b...

Source: DEV Community
You double-click a CSV file. Excel opens it. Everything looks fine until you notice that your zip codes starting with 0 are now just four-digit numbers. Your product IDs that look like dates have been converted to dates. Your phone numbers are in scientific notation. Excel auto-detected your data types and silently destroyed them. This has cost companies millions of dollars in corrupted datasets, and it happens because people open CSVs in Excel instead of properly converting them. How Excel corrupts CSV data When Excel opens a CSV file directly, it applies automatic type detection to every column. There is no confirmation dialog and no way to preview the results before they are applied. The most common corruptions: Leading zeros stripped: Zip code "07302" becomes 7302. FIPS codes, product codes, and any numeric identifier with leading zeros loses them. Dates created from non-dates: "OCT4" (a gene name) becomes October 4th. "3-5" becomes March 5th. "1/2" becomes January 2nd. This partic