aspose file tools
The moose likes JDBC and Relational Databases and the fly likes Export Query to Excel for ORACLE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Export Query to Excel for ORACLE" Watch "Export Query to Excel for ORACLE" New topic
Author

Export Query to Excel for ORACLE

sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 186
Hi,
I would like to Export the result of sql query into Excel.
regards
sudha
[ September 18, 2007: Message edited by: sudha swami ]
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3740
    
  10

A lot of GUI applications will allow you to cut and paste data into Excel but from a programmatic standpoint, its best to write a java program that converts the result set into a CSV file (just fields separated by commas) and import that into excel.

You could also try GUI tools for exporting your database directly into a CSV file.


[OCA 8 Book] [Blog]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
See if the POI Library does what you need. I've only used it to read excel but it worked easily enough.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
sudha swami
Ranch Hand

Joined: Apr 24, 2007
Posts: 186
Hi,
Thanks alot for the info. Currently i am using GUI Tool, DBVisualizer and it supports exporting the data into CSV
sudha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Export Query to Excel for ORACLE