Numeric fields lose leading zero while writing CSV in c#
c#, csv
Solution
Change the data that is saved in the csv with the following format:
="00023423"
CSV example:
David,Sooo,="00023423",World
This will show 00023423 in excel and not 23423.
Problem
I'm using an ASP.NET application which exports my clients data to CSV, I need my clients Phone number to be with the leading Zero. I need the phone numbers to be without "-" and without quotations, and due to the nature of my application I cannot use 3rd party products such as EPPLUS. I've tried to put a space and let the CSV "understand" that I need the phone number as text , but that doesn't seem right. I would like to know how to make the excel include the leading zero , without using 3rd party products. Thanks