Exporting from vb.net as .csv with preserving leading zeros for numbers

Feb 28 2008 12:49 AM

I am using vb.net and exporting data from grid which is in dataset and stored as  .CSV file format. It exports and stores in .CSV format. this is how it should work. And it is working.  When we open that exported file in notepad or other except (excel) it is correct. But when we open in excel then the leading zeros are eliminated. I want not to get eliminated.  And after exporting client is not ready to go and change settings manually. He wants that to be done in a single click of export button. (Zeros should not be eliminated in that exported file).He may open in excel or notepad or other.If he opens in notepad or other the other then it works fine with comma and zeros correctly.He wants in .CSV format with leading zeros if he opens in excel.


Answers (1)