Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Posts
    153

    Unanswered: Writting to Excel file

    Hi All,

    I want to read data from oracle 8i table, using a cursor and store the same DIRECTLY into an excel worksheet.

    Any one can help me ?



    Thanks

    JD

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Sounds like a question you should be asking on an Excel forum, not an Oracle one. Does Excel provide an API for writing worksheets? (I don't know).

    What I do is write to a simple flat file in CSV format, which Excel can load very easily.

  3. #3
    Join Date
    Jan 2004
    Posts
    153
    Thanks for your suggession.
    I got some information about OWA_SYLK UTL_FILE, which can be used to send oracle data into excel sheet.
    Could any one put a focus on OWA_SYLK UTL_FILE ?
    Last edited by jayanta_deb; 10-05-04 at 08:23.

  4. #4
    Join Date
    Nov 2002
    Posts
    833
    the necessary package can be downloaded from http://asktom.oracle.com

    & for me it works for a special purpose, but I still prefer Andrew's advice

  5. #5
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    You could also just concatinate the columns with a comma or tab and spool to a comma / tab delimited file ...

    sql> spool c:\1.txt
    sql> select username||chr(9)||sid||chr(9)||serial#||chr(9)||pr ogram from v$session;
    sql> spool off

    or
    sql> select username||','||sid||','||serial#||','||program from v$session;

    HTH
    Gregg

  6. #6
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    Excel has what is call the Microsoft Query wizard, which you can use to Query almost any DB (as long as you have the drivers for it), Microsoft built a Oracle ODBC driver with excel which you can use. Look for this under the Menu 'Data->External Data'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •