IE won't dowload Excel created by script

This is a discussion on IE won't dowload Excel created by script within the Linux Web Servers forums, part of the Web Server and Related Forums category; Linux. Apache 2.2.3. I'm using a perl CGI script and Spreadsheet::WriteExcel to create an Excel spreadsheet. ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-04-2008
Patrick Nolan
 
Posts: n/a
Default IE won't dowload Excel created by script

Linux. Apache 2.2.3.

I'm using a perl CGI script and Spreadsheet::WriteExcel to create
an Excel spreadsheet. It works just fine with the Firefox browser.
When I try to use it with IE7, there are errors.

There don't seem to be any errors on the server side. The access_log
shows return code 200. Nothing appears in error_log.

IE opens a "File Download - Security Warning" window. It recognizes
the type as "Microsoft Excel Worksheet". The options are "Open",
"Save", or "Cancel". If I choose Open or Cancel it says "Could not
open <URL of file>". Sometimes it doesn't do that. Instead it
says "Internet Explorer cannot download <filename> from <server>.
Internet Explorer was not able to open this internet site. The
requested site is either unavailable or cannot be found."

The Content-type is "application/vnd.ms-excel".

I find this quite puzzling. Does this look at all familiar?
  #2 (permalink)  
Old 02-05-2008
Patrick Nolan
 
Posts: n/a
Default Re: IE won't dowload Excel created by script

On 2008-02-04, Patrick Nolan <pln@glast2.Stanford.EDU> wrote:
> Linux. Apache 2.2.3.
>
> I'm using a perl CGI script and Spreadsheet::WriteExcel to create
> an Excel spreadsheet. It works just fine with the Firefox browser.
> When I try to use it with IE7, there are errors.
>
> There don't seem to be any errors on the server side. The access_log
> shows return code 200. Nothing appears in error_log.
>
> IE opens a "File Download - Security Warning" window. It recognizes
> the type as "Microsoft Excel Worksheet". The options are "Open",
> "Save", or "Cancel". If I choose Open or Cancel it says "Could not
> open <URL of file>". Sometimes it doesn't do that. Instead it
> says "Internet Explorer cannot download <filename> from <server>.
> Internet Explorer was not able to open this internet site. The
> requested site is either unavailable or cannot be found."
>
> The Content-type is "application/vnd.ms-excel".
>
> I find this quite puzzling. Does this look at all familiar?


More information: My server is capable of doing https, so I tried
it. It works. IE complains bitterly about my self-signed
certificate, but it will download the spreadsheet file.
  #3 (permalink)  
Old 02-06-2008
C.
 
Posts: n/a
Default Re: IE won't dowload Excel created by script

On 5 Feb, 00:03, Patrick Nolan <p...@glast2.Stanford.EDU> wrote:
> On 2008-02-04, Patrick Nolan <p...@glast2.Stanford.EDU> wrote:
>
>
>
> > Linux. Apache 2.2.3.

>
> > I'm using a perl CGI script and Spreadsheet::WriteExcel to create
> > an Excel spreadsheet. It works just fine with the Firefox browser.
> > When I try to use it with IE7, there are errors.

>
> > There don't seem to be any errors on the server side. The access_log
> > shows return code 200. Nothing appears in error_log.

>
> > IE opens a "File Download - Security Warning" window. It recognizes
> > the type as "Microsoft Excel Worksheet". The options are "Open",
> > "Save", or "Cancel". If I choose Open or Cancel it says "Could not
> > open <URL of file>". Sometimes it doesn't do that. Instead it
> > says "Internet Explorer cannot download <filename> from <server>.
> > Internet Explorer was not able to open this internet site. The
> > requested site is either unavailable or cannot be found."

>
> > The Content-type is "application/vnd.ms-excel".

>
> > I find this quite puzzling. Does this look at all familiar?

>
> More information: My server is capable of doing https, so I tried
> it. It works. IE complains bitterly about my self-signed
> certificate, but it will download the spreadsheet file.


MSIE is weird in lots of ways - this is just one of them.

I've not played with IE7 very much, but suspect you're setting the
mime type directly in the header (Content-Type: X-app/ms-excel) Try
providing the file as an attachment with 'Content-Disposition:
attachment; filename="myfile.xls"'

(IIRC this will force a download rather than opening the embedded
Excel within MSIE)

C.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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



All times are GMT +1. The time now is 06:02 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0