in reply to export to excel in CGI
I've done something similar. What I did was this: I had a page with a 'download' button. Clicking that button invoked a CGI script - but the script set its MIME type to something other that 'text/html' in the header. On most browsers, this makes you get a dialog asking if you want to 'save' or 'run' (assuming there's an associated application for that particular file type.). In my case, I was creating a .csv file (comma serparated value), and I had excel defined to be the default app for .csv files, so when I clicked 'download' I could either save the .csv file on my local hard disk, or I could open the file directly in excel (once inside excel, you can always choose 'save as' if you want to save).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: export to excel in CGI
by sir_com (Acolyte) on Sep 08, 2009 at 15:27 UTC | |
by Corion (Patriarch) on Sep 08, 2009 at 15:36 UTC |