I'm exporting the values in the grid to excel through C# code. When i open the exported excel, the string column is displayed as integer and the leading '0' in that field gets deleted. how to handle this.
4 Answers
A quick way to get around this is to prefix your cell value with an apostrophe.
Excel hides the apostrophe automatically and forces the text mode for the cell to Text
Try it directly in Excel and you'll see what I mean eg type '07799123477 into a cell with General text formatting (the default)