Hi,
I am using an export to excel functionality from my ASP
page.
I have set the content type as
Response.Conten tType = "applicatio n/vnd.ms-excel"
The data i am exporting has values like 1-2, 2-5
Now when they get exported to excel, these values get
exported as 1-02-2003,2-05-2003.
This is a feature of excel.
To overcome it in excel we usually put single quotes
before the data so that it gets interpreted as text data
i.e '1-2, '2-5. The single quotes are not visible to the
user and the data is shown as 1-2,2-5 to the user. The
single quotes are visible only when the user clicks on the
individual cell.
But when i export it from ASP page as '1-2, '2-5, these
single quotes remain visible in the excel page. I thought
the single quotes should not have been visible to the user.
They disappear only when we manually double click the cell.
Could someone plz let me know how to overcome this issue
programatically ?
Cheers
Saur 3 5233
Try outputting:
="1-2", ="2-5", etc...
(those are double quotes).
Regards,
Alan
"Saur" <sa*********@ho tmail.com> wrote in message
news:02******** *************** *****@phx.gbl.. . Hi, I am using an export to excel functionality from my ASP page. I have set the content type as
Response.Conten tType = "applicatio n/vnd.ms-excel" The data i am exporting has values like 1-2, 2-5 Now when they get exported to excel, these values get exported as 1-02-2003,2-05-2003.
This is a feature of excel. To overcome it in excel we usually put single quotes before the data so that it gets interpreted as text data i.e '1-2, '2-5. The single quotes are not visible to the user and the data is shown as 1-2,2-5 to the user. The single quotes are visible only when the user clicks on the individual cell.
But when i export it from ASP page as '1-2, '2-5, these single quotes remain visible in the excel page. I thought the single quotes should not have been visible to the user. They disappear only when we manually double click the cell. Could someone plz let me know how to overcome this issue programatically ?
Cheers Saur
Hi,
Thanks a lot.
This seems to work.
Cheers
Saur -----Original Message----- Try outputting:
="1-2", ="2-5", etc...
(those are double quotes).
Regards,
Alan
"Saur" <sa*********@ho tmail.com> wrote in message news:02******* *************** ******@phx.gbl. .. Hi, I am using an export to excel functionality from my ASP page. I have set the content type as
Response.Conten tType = "applicatio n/vnd.ms-excel" The data i am exporting has values like 1-2, 2-5 Now when they get exported to excel, these values get exported as 1-02-2003,2-05-2003.
This is a feature of excel. To overcome it in excel we usually put single quotes before the data so that it gets interpreted as text data i.e '1-2, '2-5. The single quotes are not visible to
the user and the data is shown as 1-2,2-5 to the user. The single quotes are visible only when the user clicks on
the individual cell.
But when i export it from ASP page as '1-2, '2-5, these single quotes remain visible in the excel page. I
thought the single quotes should not have been visible to the
user. They disappear only when we manually double click the
cell. Could someone plz let me know how to overcome this issue programatically ?
Cheers Saur
.
check out http://www.greggriffiths.org/webdev/both/excel/ which covers
this topic.
saur wrote: Hi, Thanks a lot. This seems to work.
Cheers Saur
-----Original Message----- Try outputting:
="1-2", ="2-5", etc...
(those are double quotes).
Regards,
Alan
"Saur" <sa*********@ho tmail.com> wrote in message news:02******* *************** ******@phx.gbl. .. Hi, I am using an export to excel functionality from my ASP page. I have set the content type as
Response.Conten tType = "applicatio n/vnd.ms-excel" The data i am exporting has values like 1-2, 2-5 Now when they get exported to excel, these values get exported as 1-02-2003,2-05-2003.
This is a feature of excel. To overcome it in excel we usually put single quotes before the data so that it gets interpreted as text data i.e '1-2, '2-5. The single quotes are not visible to the user and the data is shown as 1-2,2-5 to the user. The single quotes are visible only when the user clicks on the individual cell.
But when i export it from ASP page as '1-2, '2-5, these single quotes remain visible in the excel page. I thought the single quotes should not have been visible to the user. They disappear only when we manually double click the cell. Could someone plz let me know how to overcome this issue programatically ?
Cheers Saur
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matt |
last post by:
I have an ASP page that calls ASP routines that I created that execute
a database query and return the results to a recordset. I then iterate
through the recordset and display the data in a table. Before I iterate
through the recordset I instruct the browser that the content type is
Excel using the following line:
(Response.ContentType =...
|
by: Arvind R |
last post by:
Hello,
how to ask saveas dialog before writing the data to the excel file?
right now im able to save in c drive or any other specified location only.
any solution will be a great help!
System.Text.StringBuilder sbrHTML=new System.Text.StringBuilder("");
//StringBuilder sbrHTML = new StringBuilder();
|
by: Frank |
last post by:
Hello All,
I ham using VS.NET 2003.
Have followed instructions from
http://gridviewguy.com/ArticleDetails.aspx?articleID=26 along with several
other articles to no avail. I am pulling my hair out at this point. What I
have is this :
Members.aspx file:
|
by: Hemant Sipahimalani |
last post by:
The following piece of code is being used to export HTML to excel.
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.AddHeader("content-disposition",
"attachment;filename=ABC.xls")
HttpContext.Current.Response.Write(strHTML)
HttpContext.Current.Response.End()
However when the user tries to...
|
by: Vanessa |
last post by:
hi Everyone,
I have two questions on exporting data to Excel using ASP (w/o converting
formatted excel file into web page and then plug in the dynamic data):
1. Can we export data into different sheets at Excel?
2. Can we do graph at export?
Thanks!!
| |
by: JawzX01 |
last post by:
Hello All,
First, thank you for any help you can provide.
I'm trying to do a simple export to excel. I've used the classic
code that is all over the internet, and of course it worked without a
problem.
The problem is that I want to add text above the data grid in the
excel sheet. The text already exists on the web page in various panels...
|
by: smaczylo |
last post by:
Hello, I've recently been asked to work with Microsoft Access, and
while I feel quite comfortable with Excel, I'm at a complete loss with
databases. If someone could help me with this issue I'm having I'd be
most appreciative. The database is already constructed, I'm just
wanting to export the data to an excel file.
In short, I'm hoping...
|
by: Merlin1857 |
last post by:
Its great producing data for users to look at in your web pages and generally that is sufficient for their needs but sometimes you may want to supply your user with the data in a form they can actually do something more with. This code shows you how to display data from your database and then how to give that data to the user in the form of a...
|
by: =?Utf-8?B?YzY3NjIyOA==?= |
last post by:
Hi all,
I have a question for you.
I have a .csv file which has many lines of data.
Each line has many data fields which are delimited by ",".
Now I need to extract part of data from this file but save it as an excel
file.
The data in this excel file will be imported into an Access database. The
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |