Solved

generating Excel report from GridView results  in ASP.Net 2.0

Posted on 2007-11-27
7
671 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

691 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