redirecting output to Excel
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: redirecting output to Excel

Hybrid View

  1. #1
    Join Date
    Jun 2001
    Posts
    45
    Is there any sql/sqlplus command to redirect output from oracle database to EXCEL...


    Thanks in Advance

  2. #2
    Join Date
    Jan 2000
    Location
    Arlington,VA,USA
    Posts
    11
    Connect to Oracle from Excel by Using ODBC connectivity
    once you are connected you will have an option of using
    a query write the query and the output will be in Excel
    sheet.
    For ODBC connectivity: Go to Data - Get External Data-
    New datasources - (Select ODBC)

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    You can indirectly do it with the "colsep" attribute of sqlplus. With this method, you willl have to spool your output to a file and then load it into excel.

    From sqlplus:
    set colsep |
    spool xxx.out
    select ......
    spool off

    Then, load the pipe seperated file into excel.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    Mar 2001
    Location
    New York , New York
    Posts
    577
    or you can set the column sep to a , (comma) and give the spool file an extension of .csv.

    In this way once the spool is done you can just double click on the .csv file and excel will automatically launch it.

    Ronnie
    ronnie_yours@yahoo.com

    You can if you think you can.

  5. #5
    Join Date
    Dec 2001
    Posts
    221
    simply take the normal spool from your select statement. and open the spool file in excel using menu.

    it will ask for column partitions.

    Santosh Jadhav
    8i OCP DBA

Posting Permissions

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



Click Here to Expand Forum to Full Width