if you alter the same script that generate the tables, get rid of the and , get rid of all , replace all instances of with a tab, and replace all instances of wit ha line break, you have a properly formatted csv file (provided there are no tabs or line breaks in your data). You can then make a button that calls a script that generate the file for download.
Do you know how to create headers that force a download?
You may need Macromedia
Flash Player
to view parts of this site. You may download it here.
Copyright 2004,
NCL Glendale. All rights reserved.
Support and development by PC Techies
maybe I can help, but I have only done that in jsp-pages.
To export a table, I have a button, which opens a new jsp-Page, just call it excel.jsp. In excel.jsp I set the following values of the Response-object:
Afterwards, I open the connection to the database, get the ResultSet and instead of writing it into a table, I use a OutputStream, which I get from the Response-Object:
OutputStream ostr = response.getOutputStream();
For every col I add a ";" after the colvalue, after every row I add a "\n" for a linebreak.