Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Output to Excel 2007

Reply
Thread Tools

Output to Excel 2007

 
 
displayname
Guest
Posts: n/a
 
      08-22-2008
The following code used to outputs to Excel 2003 fine. Do I need to change it
to output to Excel 2007?
<%
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=List.xls"
%>

In addition, it pops a small File Download - Security Warning window showing
the Name: List.xls
Type: MS Excel 97-2003 Worksheet, 2.66 MB
and it displays the output in Excel fine.

But other times it it pops a small File Download - Security Warning window
showing the
Name: MyAspPage_asp (instead of List.xls)
Type: MS Excel 97-2003 Worksheet, 416 bytes
and when I click on Save it shows error:
IE cannot download MyAspPage.asp
and if I click Open instead of Save it will pop up a small Microsoft Office
Excel window with the following error:
"Microsoft Excel cannot access the file
'https://www.myurl.com/dir1/MyAspPage.asp'. There are several possible
reasons:
- The file name or path name does not exist.
- The file you're trying to open is being used by another program. Close
the document in the other program, and try again.
- The name of the workbook you're trying to save is the same as the name
of another document that is read-only. Try saving the workbook with a
different name."

 
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
extra rows in a CSV module output when viewed in excel 2007 JonathanB Python 4 08-20-2010 12:15 AM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
Call for Papers (Extended Deadline): 2007 International Conference on Modeling, Simulation and Visualization Methods (MSV'07), June 25-28, 2007, USA A. M. G. Solo VHDL 0 02-21-2007 09:17 AM
Last Call for Papers: 2007 International Conference on Modeling, Simulation and Visualization Methods (MSV'07), June 25-28, 2007, USA A. M. G. Solo VHDL 0 02-15-2007 01:12 AM



Advertisments