Export to Excel with Formatting drops leading zeroes (0)
Thanks for a great product. Unfortunately we've hit upon an issue. When we Export to Excel with Formatting, the export drops any leading zeroes (0) on columns that contain numeric data with leading zeroes. This is an Excel behavior that is generally resolved by explicitly setting the column format to text. Unfortunately this has to be done prior to the export because the leading zeroes are not retained in the exported data. Linqpad could detect this issue and handle it during export (preferred) or allow us to specify the exported column type prior to export.
Comments
I take is CSV is not an option?
The only way to keep the leading zeros in excel from a csv file is by changing the extension of the csv file to .txt, then just open excel, click on open, select the txt file, and you'll see the Text Import Wizard. Select your csv format (separated by commas), then just make sure you select "Text" as the format.
And that's it, now you can export that previous csv data to any other while keeping the leading zeros.