Solved

generating Excel report from GridView results  in ASP.Net 2.0

Posted on 2007-11-27
7
667 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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