Solved

generating Excel report from GridView results  in ASP.Net 2.0

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now