troubleshooting Question

How to preserve leading zeros in CSV file when saving in Excel

Avatar of AaronSSH
AaronSSHFlag for United States of America asked on
Microsoft ExcelMicrosoft Office
15 Comments1 Solution122 ViewsLast Modified:
I have a large 300,000 row CSV file that I need to split into 4 CSV files. When I open this CSV file in notepad, I can see that the leading 0's are there for our part numbers: (000006446) for example. Excel by default truncates the leading zeros from view when I open the CSV. That's fine, I don't need to see them there. The problem is that when I use Excel to modify this CSV file and save a copy, then Excel updates the CSV file and removes all of the leading 0's from the file.

Does someone have a creative idea on how to preserve my leading zeros? I can't just convert the column to Text format because the leading zeros are already dropped from the view in Excel, so this too removes all of the leading zeros.
IT Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros