#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    1
    Rep Power
    0

    Data From Oracle and writing in Excel file


    Hi,

    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.

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,781
    Rep Power
    348
    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):

    http://jakarta.apache.org/poi/

    With VB you should be able to do it via OLE automation.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    SPOOL ON dump.tab;
    SELECT * FROM some_table
    SPOOL OFF;
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Manchester, UK
    Posts
    23
    Rep Power
    0
    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
    www.oraxcel.com

IMN logo majestic logo threadwatch logo seochat tools logo