Click here to Skip to main content
14,577,630 members
Rate this:
Please Sign up or sign in to vote.
See more:
i am exporting gridview data to excel sheet using following code

using (StreamWriter sw = new StreamWriter(Server.MapPath("excel.xls")))
            using (HtmlTextWriter hw = new HtmlTextWriter(sw))

but problem is that when an entry is like 0123234

it store only 123234 in excel sheet not 0
how will it show original data
thatraja 16-Nov-10 9:08am
I don't know who down-voted, may be you should have mentioned the issue in title, I was faced the same issue once upon a time.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Try this one which is explained with appropriate screen-shots.

Extensive Study of GridView Export to Excel[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100