#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default IE & Excel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default IE & Excel

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default IE & Excel

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"