lxrocks a écrit :
Quote:
Hi
I have always downloaded table data to excel using a perl_cgi. The perl
cgi will simpley print("Content-Type: application/vnd.ms-excel");
followed by the usual html table formatted data.
where does-it print that ?
Quote:
However if I try the same with javascript it does not seem to work.
where do you try the following ?
Quote:
ie document.write("Content-Type: application/vnd.ms-excel");
document.write("<html><table><thead>bla bla...</html>);
That would have to write an "html" file ( *.html )
Quote:
This never triggers the save file as/ or open with excel. It displays
the data in the browser but does not trigger an excel save.
>
>
What am I doing wrong?
To do not produce an Excel file ( *.xls ) ?
My last play with this idea (Excel document) :
http://perso.orange.fr/stephane.mori...o_xls_op.shtml
Perhaps with XML and JS-DOM ?
And read or re-read here in c.l.javascript the thread :
"FAQ Topic - How do I prompt a "Save As" dialog for an accepted mime type?"
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/ca13c70349b96de6/75c7b581bb814f10?#75c7b581bb814f10>
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date