Output to Excel 2007

Discussion in 'ASP General' started by displayname, Aug 22, 2008.

  1. displayname

    displayname Guest

    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."
    displayname, Aug 22, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Philippe Geril
    Replies:
    0
    Views:
    343
    Philippe Geril
    Jun 15, 2007
  2. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,498
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  3. Scott Abel
    Replies:
    0
    Views:
    437
    Scott Abel
    Oct 17, 2007
  4. JonathanB
    Replies:
    4
    Views:
    541
    JonathanB
    Aug 20, 2010
  5. Mauricio Fernandez
    Replies:
    0
    Views:
    175
    Mauricio Fernandez
    Jan 5, 2007
Loading...

Share This Page