[thelist] Netscape Navigator 4 and downloading a perl-originated CSV Excel file

Means, Eric D eric.d.means at boeing.com
Fri May 24 13:33:10 CDT 2002


I have a Perl CGI script that generates a comma-separated list of values for
download as an Excel spreadsheet.  The Perl script produces the following
headers (not including the 200 OK header):

Content-Disposition: attachment; filename=troublereports.csv
Content-Type: application/vnd.ms-excel
Cache-control: no-cache
Pragma: no-cache

This is followed by a standard comma-separated list of values comprising
troublereports.csv.

In rational browsers (IE4+, Moz) the above works as expected, every time.
However, NN4 is giving me problems (and I have to support it).  The first
time this request is executed, Navigator works fine; the spreadsheet is
downloaded and opened in Excel, and works fine.  The second, and any
subsequent, time the request is executed without closing and reopening the
browser, the spreadsheet comes out corrupted (for lack of a better word).
Basically, all of the content is smushed together and presented in a single
cell, as if the comma-delimiting weren't happening.

Can anyone help me figure out why the second request is failing in NN4?
It's not a problem with the code, as it generates the same exact response
every time; NN4 is screwing up, not the CGI.  Is there any workaround
besides closing and reopening NN4 between each request?



More information about the thelist mailing list