From: shank on
Having problems with below. I have a page that generates Excel sheets.

If I comment out the next line, data displays on screen as expected.
<% Response.contenttype = "application/vnd.ms-excel" %>

Uncomment the above line and insert this line, it opens Excel as expected
<% On Error Resume Next %>

Remove "On Error..." and Uncomment the above line, I get an error the "Page
Cannot Be Found". Also, in the message box, the expected filename is
displayed as stuff_asp instead of stuff.asp.

What's wrong? How do I troubleshoot between code or data? Would something in
the data have an influence on this line? <% Response.contenttype =
"application/vnd.ms-excel" %>

I would assume the page would at least begin to load and if there was data
issues, it would fault at that spot.

thanks!


From: Bob Barrows on
shank wrote:
> Having problems with below. I have a page that generates Excel sheets.
>
> If I comment out the next line, data displays on screen as expected.
> <% Response.contenttype = "application/vnd.ms-excel" %>
>
> Uncomment the above line and insert this line, it opens Excel as
> expected <% On Error Resume Next %>

With the correct data shown in Excel?

>
> Remove "On Error..." and Uncomment the above line, I get an error the
> "Page Cannot Be Found". Also, in the message box, the expected
> filename is displayed as stuff_asp instead of stuff.asp.
>
> What's wrong? How do I troubleshoot between code or data? Would
> something in the data have an influence on this line? <%
> Response.contenttype = "application/vnd.ms-excel" %>

Obviously, that is not the line that is causing the problem.

>
> I would assume the page would at least begin to load and if there was
> data issues, it would fault at that spot.
>
I would suspect the line that assigns the name of the xls file, which you
haven't shown us.

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"