D
Danny Tuppeny
I've been upgrading our reporting module to output .docx and .xlsx files
instead of the Office 2003 formats (since the new ones will work for our
clients on Office 2000 with the compatibility pack), and I've come across a
major issue in the way (I believe) IE passes the files off to Excel.
Here is the headers we're sending:
Excel:
Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Content Disposition: inline; filename=OurReport.xlsx
Word:
Content Type:
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Content Disposition: inline; filename=OurReport.docx
Everything is fine with Word, but with Excel, the Open/Save dialog pops up
(this shouldn't happen with content disposition set to inline?). Save works
fine, but clicking Open loads the LOGIN page of our web application in Excel.
I've included below the http requests from the IIS log. It seems to me, that
rather than sending the body of the response to Excel, IE is *throwing away*
the report, and telling Excel to go and fetch it itself (by giving it the
URL), since "Office Existence Discover" shows up next in the logs, and since
Excel doesn't have a logged in session, our web app redirects to the login
page (which Excel badly renders).
If I put a breakpoint on the report handler, it seems to be hit twice (once,
I assume is IE taking the body to throw away, and the second is Excel which
has no login credentials).
First off, is this a bug? I can't imagine it being desired behaviour.
Secondly, does anyone have any ideas how we might work around this?
Thanks
instead of the Office 2003 formats (since the new ones will work for our
clients on Office 2000 with the compatibility pack), and I've come across a
major issue in the way (I believe) IE passes the files off to Excel.
Here is the headers we're sending:
Excel:
Content Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Content Disposition: inline; filename=OurReport.xlsx
Word:
Content Type:
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Content Disposition: inline; filename=OurReport.docx
Everything is fine with Word, but with Excel, the Open/Save dialog pops up
(this shouldn't happen with content disposition set to inline?). Save works
fine, but clicking Open loads the LOGIN page of our web application in Excel.
I've included below the http requests from the IIS log. It seems to me, that
rather than sending the body of the response to Excel, IE is *throwing away*
the report, and telling Excel to go and fetch it itself (by giving it the
URL), since "Office Existence Discover" shows up next in the logs, and since
Excel doesn't have a logged in session, our web app redirects to the login
page (which Excel badly renders).
If I put a breakpoint on the report handler, it seems to be hit twice (once,
I assume is IE taking the body to throw away, and the second is Excel which
has no login credentials).
First off, is this a bug? I can't imagine it being desired behaviour.
Secondly, does anyone have any ideas how we might work around this?
Thanks