Retain Leading Zero in CSV
We are exporting the output in CSV format but CSV is not showing leading zeros.
For example - if the value is 0002 then it appears as 2 in CSV.
Is there any method or trick to retain leading zeros.
Although, this can be done through excel macro(after the file is opened) but for that manual intervention is required.
Is there any way to run excel macro through web page ? I mean if we could automate the procedure of running macro.
so that user just clicks on the button "Export to CSV" on web page and he gets the output in Excel with leading zeros retained.
If you want to retain the leading zeros you can use an equal sign in front of your double quoted values.
That should do the trick.