Solved

generating Excel report from GridView results  in ASP.Net 2.0

Posted on 2007-11-27
7
668 Views
Last Modified: 2013-11-07
I am generating an excel report from the GridView results.
Their is a column like size and it may have a leading zero like '05'
Excel is formatting 05 as a number and displaying it as 5 .

How to retain the leading zero.


0
Comment
Question by:sonalj
  • 3
7 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 20372164
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 20372192
0
 

Author Comment

by:sonalj
ID: 20374551
I fixed it like this->In Page_PrerenderComplete i have

 oRow.Cells(2).Text = " " & oRow.Cells(2).Text

The problem was when generating the excel 05 was displayed as 5 in the excel sheet not in the gridview . gridview was fine.
So appended a space there and now it displays 05 as 05 and 5 as 5.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 20375185
Great...

You can ask for a refund here: http://www.experts-exchange.com/Community_Support/General/
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 21146860
PAQed with points refunded (250)

Computer101
EE Admin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question