Connecting Tech Pros Worldwide Help | Site Map

Output to Excel 2007

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 22nd, 2008, 04:45 PM
=?Utf-8?B?ZGlzcGxheW5hbWU=?=
Guest
 
Posts: n/a
Default Output to Excel 2007

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."


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.