Problem displaying recordsets in Excel Format

D

David Alexander

I have a classic asp application that routes it's output to Excel via Internet Explorer.
It's worked for 6 years without a problem. Last week some of my users upgraded to Excel 2003. Now the spreadsheet won't be created. The code still works on Excel 2000 but on the new machines a window appears but it closes before Excel can be seen.

The code in the script looks like this...

Case "Excel"
Response.ContentType="application/vnd.ms-excel"

After searching this newsgroup i've added the following lines to the code but they don't seem to fix the problem...

Response.Buffer = True
Response.charset = ""

This code sample in this knowledgebase article works on both Office 2000 and 2003 machines, but i tried to tailor it to my script without luck. Any ideas?
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q271572
 
E

exceluserforeman

Hello,
I am taking a wild punt here, in other words, I am guessing...
Maybe you need to declare "everything"
strings, objects etc

I believe (have heard? [have read?]) that EXCEL 2003 needs just about
"everything" to be dimmed in one way or another.

also, if you are referencing an object like a textbox,label, shape, you have
to use its extension-type.
..caption, .text etc

eg: instead of
if textbox1=strwhat then
....
you use
if textbox1.text=strwhat then
....

Also, I do not know if you use the Left or Right function but you be better
to use the global Mid Function.

Hopes this help otherwise please ignore my ramblings ....
 
D

David Alexander

Thanks for your guess, i think the culprit was XP SP2 or at the very least a security setting. By adding our site to the list of trusted Local Intranet Sites, the problem was corrected.


Hello,
I am taking a wild punt here, in other words, I am guessing...
Maybe you need to declare "everything"
strings, objects etc

I believe (have heard? [have read?]) that EXCEL 2003 needs just about
"everything" to be dimmed in one way or another.

also, if you are referencing an object like a textbox,label, shape, you have
to use its extension-type.
..caption, .text etc

eg: instead of
if textbox1=strwhat then
....
you use
if textbox1.text=strwhat then
....

Also, I do not know if you use the Left or Right function but you be better
to use the global Mid Function.

Hopes this help otherwise please ignore my ramblings ....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top