473,326 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Export to Excel From ASP: Text Data Interpretation issue

Hi,
I am using an export to excel functionality from my ASP
page.
I have set the content type as

Response.ContentType = "application/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
Jul 19 '05 #1
3 5222
Try outputting:

="1-2", ="2-5", etc...

(those are double quotes).

Regards,

Alan

"Saur" <sa*********@hotmail.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.ContentType = "application/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

Jul 19 '05 #2
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*********@hotmail.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.ContentType = "application/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

.

Jul 19 '05 #3
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*********@hotmail.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.ContentType = "application/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

.


Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
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....
2
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! ...
4
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...
13
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"...
7
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...
1
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...
1
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...
7
Merlin1857
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.