469,909 Members | 1,564 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

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 5035
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Matt | last post: by
2 posts views Thread by Arvind R | last post: by
4 posts views Thread by Frank | last post: by
13 posts views Thread by Hemant Sipahimalani | last post: by
7 posts views Thread by Vanessa | last post: by
1 post views Thread by JawzX01 | last post: by
3 posts views Thread by =?Utf-8?B?YzY3NjIyOA==?= | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.