Title: FW: CSV in excel from the web

I stumbled across this and thought it was pretty cool. If you send a "Content-type: " header of "application/vnd.ms-excel", you can use html tables (with html formatting!) to build excel spreadsheets.

print "Content-type: application/vnd.ms-excel\n\n";
print "<table border=1>\n";
print "<tr><td><b>1<</b><td>2<td>3\n";
print "<tr><td><font color=red>4</font><td>5<td>6\n";
print "<tr><td>7<td>8<td>9\n";
print "</table>\n";

By default, Excel is still going to display in an integrated IE window. You can turn that off, but for the life of me, I can't recall how.

-----Original Message-----
From: Gonzalo Q. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 9:44 AM
To: [EMAIL PROTECTED]
Subject: CSV in excel from the web



Hi,

I have a script that connects to a database and pulls out lots of
rows...  Now, what I'm doing is outputting that to a CSV fromatted file and
using CGI's redirect method to send my browser to my newly created
file.  Very neat.  Except that excel opens up embedded into my IE (when I
do "open from current location") and the CSV data gets placed into the
first field in excel.  If I save the file to disk and then go double click
on it, the file is normal, each field is in it's own field.
I've tried semi colon separated, commas, periods, happy
faces..  nothing...  Still, if I open from current location, everything
gets shoved into the first field in excel.
Can this be done or am I stuck with microsoft's infinite wisdom??

Thanks very much in advance!

Gonz



_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to