January 6th, 2004, 10:53 AM
Data From Oracle and writing in Excel file
WISH YOU A VERY HAPPY NEW YEAR.
I am working with oracle since last 2 months,
so not very good with it.
Question: I have few queries which are fine and are simple ones. I now need to dump the result of these queries into an
excel file without using any other languages like Java or VB or....
Any help would be appreciated.
January 6th, 2004, 06:34 PM
There is a simple "workaround": save the data as a text file with the extension xls and delimit the columns with tabs.
Excel will happily open that
Drawback is, that it will not detect non-character data correctly (or not always, depends on your data, especially dates are a problem).
With Java you can use Jakarta's POI libraries which can write native Excel files without the need of Excel (or even a Windows OS):
With VB you should be able to do it via OLE automation.
January 12th, 2004, 10:59 AM
SPOOL ON dump.tab;
SELECT * FROM some_table
January 14th, 2004, 10:20 AM
You could use SQL*XL. It is an addin for Excel that just takes your SQL and puts all the results in the spreadsheet. As easy as that!
Find SQL*XL at www.oraxcel.com
If you want to use it for other database types you need SQL*XL ADO as well.
Best regards, Gerrit-Jan Linker
Linker IT Consulting Limited