[thelist] Get excel files from html
Brian Cummiskey
Brian at hondaswap.com
Wed Dec 8 09:02:56 CST 2004
Andreas Wahlin wrote:
> I can't just ask them to take save as something, since the first page
> contains navigation, header and footer as well as the tabular data, and
> I might wish to include some extra data in the excel file as well.
I've done things like this in the past for work as well. I think i can
offer some advice.
the approach I took was to actually place a "Save" Button on the bottom
of the html table.
combined with some javascript, I basically sent the user to the download
page. when you send the content type out to force the download, you
will stay on the current page. download.com is a perfect example. say
you are on download.com/dls/winzip.exe but you are still viewing the
download page while the download ensues.
So, try something like this:
<html>
// your table here
<br />
<a href="savefile.asp">Save file</a>
</html>
and then in savefile.asp,
put in your content type headers to force the download.
prompt box pops up.
and meanwhile, the user is still on the very same page (viewing at least)
try that
More information about the thelist
mailing list