Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > troubles with Excel

Reply
Thread Tools

troubles with Excel

 
 
shank
Guest
Posts: n/a
 
      04-21-2010
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!


 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      04-21-2010
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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to return an excel file or excel data from ASP.NET Anonieko ASP .Net 2 02-12-2008 07:03 PM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
using Microsoft Excel image for Export to Excel button =?Utf-8?B?U3JpZGhhcg==?= ASP .Net 0 12-09-2005 08:58 PM
exporting an excel file from database; making changes to excel file and updating the database by importing it back Luis Esteban Valencia ASP .Net 1 01-12-2005 12:28 AM
Excel _WorkBook vs. Excel.Workbook =?Utf-8?B?SmltIEhlYXZleQ==?= ASP .Net 1 09-29-2004 03:48 PM



Advertisments