Connecting Tech Pros Worldwide Help | Site Map

Output to Excel 2007

  #1  
Old August 22nd, 2008, 05:45 PM
=?Utf-8?B?ZGlzcGxheW5hbWU=?=
Guest
 
Posts: n/a
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."

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 Report Output to Excel Suzanne801 answers 2 October 31st, 2008 02:37 AM
Re: can't redirect to Excel Paul Lautman answers 18 July 20th, 2008 02:45 PM
output to excel question bobh answers 7 October 25th, 2007 05:25 PM
Problem to convert xml to excel sheet using xslt Ch Pravin answers 2 August 9th, 2007 03:32 PM