I have 12 tables that I need to query via JSP... no problem. Then I display a view of data in a JSP page, and I would like to send/save the data to an Excel or CSV file format. I've seen pages where you ask users to download a CSV file and then they can open it in Excel, but the scripts are server-side, and I can't seem to find any documentaion on exports other than .dmp files with Oracle. Any ideas, or resources you can recommend? The data needs to eventually end up in an Excel template that allows user to sort, and add data. Using a total Web solution is planned for the future, but development time is short and a quick solution is needed. I don't have to save any of the data back to Oracle from Excel in this first attempt, only send the queried data from the Web to a CSV format or an Excel file/template... hope you can help.
If I understand you correctly, you are trying to write a JSP application which will let you save the output from a database query to the user's hard drive in CSV format. The easiest way to do this is to create a JSP page which displays the information in comma-delimitted form! Then, the user just has to choose File->Save As from their browser window and save the HTML page as TEXT format.
If you want this to be automated, then you are probably looking at creating a Java applet which takes the output and puts it in a file on their hard drive.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.