Reputation: 2409
I am trying export gridview to csv.
But problem occur when my column has long number, csv shows 890+32 like this.
I don't want like this, want actual number like 89012345676898899998776766544333445556677.
How to do that? I am not using Gridview.RenderControl(htmltextwrtter)
.
Upvotes: 1
Views: 106
Reputation: 1494
Try to cast the number into a String and add a leading '
to force excel to see the entry as text, like this:
'89012345676898899998776766544333445556677
Otherwise excel will see them as numbers (which they are, of course) and auto-format them in the unwanted format.
Upvotes: 1