Output to Excel 2007

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?ZGlzcGxheW5hbWU=?=

    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.Conten tType = "applicatio n/vnd.ms-excel"
    Response.AddHea der "Content-Disposition", "attachment ; filename=List.x ls"
    %>

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

Working...