Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello €“
I have an Excel model, code resides in Workbook_Open. A web poll is taken where user results populate an Excel file at the back end. The user is prompted when the poll is complete to download the Excel file. All works as desired but when IE is used to take the poll, the Excel file calculates correctly but opens in IE. Are there methods or procedures I can tweak not allowing the file to open in IE? I would prefer the standard options of open in Excel or save to location of choice. Sincerely, Arturo |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Arturo,
Arturo wrote: I have an Excel model, code resides in Workbook_Open. A web poll is taken where user results populate an Excel file at the back end. The user is prompted when the poll is complete to download the Excel file. All works as desired but when IE is used to take the poll, the Excel file calculates correctly but opens in IE. Are there methods or procedures I can tweak not allowing the file to open in IE? I would prefer the standard options of open in Excel or save to location of choice. If you are in control of the web server, you could modify the MIME type of ..xls files to be something that will force a download. Or if you're serving up the workbook via ASP or some other type of server-side code, you could set the following headers to force a download: Content-Type = application/download Content-Disposition = attachment; filename=test.xls But I've found that it's very difficult to force the user to save the file, and sometimes IE and other browsers will not respect the filename you try to give it. Another option is to provide a link and instruct the user to right-click and save target as. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ciao Arturo,
I went across the same issue some years ago and solved it like this: on the html page I instructed the users to set files ending by .xls not to open in the IE window. This can be set in Windows Explorer / Tools menuitem / Folder Options menuitem / File Types tab / select XLS / Advanced button / UNCHECK "Browse in the same window". I did the same for PPT and DOC. Stefano Gatto "Jake Marx" wrote: Hi Arturo, Arturo wrote: I have an Excel model, code resides in Workbook_Open. A web poll is taken where user results populate an Excel file at the back end. The user is prompted when the poll is complete to download the Excel file. All works as desired but when IE is used to take the poll, the Excel file calculates correctly but opens in IE. Are there methods or procedures I can tweak not allowing the file to open in IE? I would prefer the standard options of open in Excel or save to location of choice. If you are in control of the web server, you could modify the MIME type of ..xls files to be something that will force a download. Or if you're serving up the workbook via ASP or some other type of server-side code, you could set the following headers to force a download: Content-Type = application/download Content-Disposition = attachment; filename=test.xls But I've found that it's very difficult to force the user to save the file, and sometimes IE and other browsers will not respect the filename you try to give it. Another option is to provide a link and instruct the user to right-click and save target as. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|