How to save query result in excel file

Hi all,
How to save query result in excel file from sql*plus tool.
thank you

Do you really need an Excel file (binary) or a simple CSV?
If you just need a CSV then search for DUMP_CSV at http://asktom.oracle.com or at this forum
If you need formatting and/or multiple worksheets then you can use free tools like
https://xml-spreadsheet.samplecode.oracle.com/ or https://exceldocumenttype.samplecode.oracle.com/
Regards
Marcus

Similar Messages

  • How to save query result on the file server as excel file?

    Hi everyone,
    I need to save the the query result on the file server as excel file.
    Do you have any idees how can I do it?
    Regards
    Erwin

    i dont think you can save as excel file but you can save it as CSV use APD or RSCRM BAPI for this

  • How to save Android contacts as Excel file on Mac computer?

    I want to manage and edit my contacts on my cell phone, my friend suggested me save them as Excel format! So now i am trying this way, but i can't find the right method to do this! Do you know how to save Android contacts as Excel file on Mac computer?

    If you want to save Android Phone contacts to Excel format, you can have a try the following method:
    Step 1. Connect Your Android Phone to Computer
    After downloading and installing the Coolmuster Android Assistant software on your computer, launch it and you will get the program interface prompts you to connect your phone to the computer. Just use a USB cable to connect your phone to the computer and the program will detect the connected phone automatically. If it is the first time to run this software, you may encounter the following picture and be required to enable USB debugging on your phone at first. If your device can be detected by the program, you can directly skip to the next step.
    Step 2: Go to the Contacts windows
    All your phone data are categorized on the top menu. To transfer Android phone's contacts, you can go to click the "Contacts" icon to enter the Contacts window. Navigate to the left panel and click on the "All Contacts" option, then, all the contacts in your phone will show in list on the right window. Mark the contacts you want to backup on your computer and click the button of "Backup".
    Step 3. Start to export contacts to computer at once
    Once you click on the "Backup" button, there will be a "Path" dialog appears, asking you to choose an output location where you want to save the exported contacts. Specify an output folder and then click the "Ok" button. Then, all your phone contacts will be exported to the output location immediately, with all the email address, company's name, home address, and more contacts info perfectly kept in the output CSV or XLS file.

  • How to save query result in to DSO & Infocube

    Dear colleagues:
    I met a requirment,I wanna save query results into BW model (infocube & DSO),Is there any solution about this issue ?
    Thanks alot
    Best regard
    DAVID
    Edited by: David on Nov 14, 2008 9:59 AM

    Hi David,
    Only possiblity is through APD. You can use Query as source and  try to creat new ODS or CUBE , you can assign what ever fields you want to be in ODS/CUBE.
    for APD creation u go for sap.help.com
    You can schedule this APD, and what ever data updated to query it iwll be udated in ODS/CUBE.
    cheers
    Leena

  • How to save data into an excel file ?

    I am working on using computer to corol HP8510 Network Analyzer System. Firstlly, I save my data into a notepad.Now I want to save them directly into an excel file. Is there anybody can give me any clue?
    Thanks
    Attachments:
    S.vi ‏165 KB

    The attached zip file contains several VI's to read and write directly to Excel using ActiveX. There are several example VI showing how to use everything. This set is saved in LabVIEW 6.0.2.
    I suggest you unzip these to your user.lib directory so you'll be able to easily access them from the functions palette.
    I have not actually used these, but others that have say they have worked well for them.
    Good Luck
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    excel_lv6i.zip ‏898 KB

  • Select query results into excel file

    Hi,
    I want to put the results of a select query in an csv file(tab separated columns). I dont want to spool command for this . Is there any other method to do this.
    Thanks

    To get data from oracle to excel to use odbc driver to achive this.

  • How to save cluster in some excel file

    Hi,
    I have been using bundle function to draw XY graph from 2 one dimensional array. However, I need these values to be saved in some excel file so that I can look at the graph in future. However, I could not connect the "output" of "Bundle" function to "ClusterToArray" function and so, I am not able to save the date, please let me know how to do.
    Thanks,
    Dushyant

    One way of doing it would be to create a 2D array from you one dimensional arrays rather than the output of the bundle. Then you would need to transpose the 2D array and using the Write to spreadsheet VI to save the data in excel. See the attached picture.
    Andrew Alford
    Production Test Engineering Technologist
    Sustainable Energy Technologies
    www.sustainableenergy.com
    Attachments:
    array to excel.JPG ‏14 KB

  • Procedure to write Oracle Query Result to Excel file?

    Hi All,
    I have a requirement to write a procedure which will write the result of a Query (select statement) to a Excel file.
    I use a third party tool to do so but it fails when the query fetches more than 65000 records!
    Can someone suggest me a procedure ( may be written in PL/SQL ) which can be used to achieve this task?
    If there is a procedure available readily, can you please share it with me?
    Thanks in advance
    Himanshu Dabir

    There is a ready procedure (actually PL/SQL blocks by Tom Kyte) available at
    http://www.quest-pipelines.com/newsletter-v5/0704_C.htm
    but it also suffers from Microsofts limitation of 65536 rows per sheet.

  • How to save and retrieve an excel file as an object into lob column?

    Hi ,
    I need to save and retrieve the whole excel file with 3 or more sheets as an object into the lob column of table.
    For example:
    t_docments
    (doc_id number,
    excel_data clob
    All excel files need to be saved to excel_data column.
    What should I do?
    Thanks

    Did you check the asktom thread posted by Jens?
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P1
    1_QUESTION_ID:232814159006
    There's example of varies file types.Yes, I did try some examples.
    Those work for .doc/.pdf/.jpg files, BUT NOT for excel file.
    The following error happened when retrieving excel file(retrieving .doc/.pdf are OK)
    ORA-29285: file write error
    ORA-06512: at "SYS.UTL_FILE", line 18
    ORA-06512: at "SYS.UTL_FILE", line 375
    ORA-06512: at "SYS.UTL_FILE", line 990

  • Export result of ssas query result to excel file

    Hi All,
    I have browsed a SSAS cube. I want to export result of SSAS cube into excel file.
    Kindly give your input.
    Thanks,
    Vivek singh

    Hi,
    I do not know whether there is a direct solution but there is an indirect way of doing it. I always follow this method if I ever want to get MDX results into Excel.
    1 - Install the DAX Studio (I know you want MDX results, so do not get confused by looking at the word DAX. Continue reading). You can download it from the following location.
    http://www.sqlbi.com/tools/dax-studio/
    2 - Once you install DAX Studio, Go to the Add-Ins ribbon. Click on DAX Studio. 
    3 - There is an option "Tabular Server" and there is a drop-down list where you can enter the SSAS (MD CUBE Server) server name. Enter the server name manually. If you have multiple SSAS Databases and if you are interested in a specific SSAS database
    enter "Initial Catalog=Your SSAS Database Name" in Additional Options section and Click Connect. You can successfully connect to the SSAS Server now.
    Here are the details described so far in pictorial representation.
    4 - Enter your MDX manually and execute the code via DAX studio and you will get your results right-away in Excel.
    Now, isn't that an elegant way of getting MDX results into Excel :) ? Besides Excel's Pivot Table option, I do not know whether there are any alternate solutions to this but wait for other Pros' comments as well.
     Best regards...
    Chandima Lakmal Fonseka

  • How To Save JSP Page As Excel File.

    Dear Friends,
    I am working on a project which has oracle as backend. I have some reports in my project.(.jsp files)I want to save it in MsExcel format.
    How could i do it?
    Also is it possible to save jsp files (the output genrated by jsp) in MS Word,PDF format?
    Sameer.

    If you set the content type and are using IE then the HTML will be rendered in Excel in place. Other browsers open Excel, but not in place.
    If you need more info search google for 'java setcontenttype excel':
    <% response.setContentType("application/vnd.ms-excel"); %>Also a much easier and flexible way to create html from ResultSets is to use my free FormattedDataSet API. The following one line would replace all the lines you posted (and the ones you didn't such as opening the Connection, Statement and ResultSet).
    FormattedDataSet fds=FormattedDataSet.createInstance();
    String html=fds.getFormattedDataSet("select * from table", "htmlTable");steve - http://www.fdsapi.com - The easiest most flexible way of generating dynamic HTML and XML.
    The following would be replaced.
    <table>
    <tr> <th>Name</th> <th>Employee No</th></tr>
    <tr>
    <%
    while (rs.next())
    %>
    <td><%=rs.getString(1) %>
    </td>
    <td><%=rs.getString(2) %>
    </td>
    <%
    %>
    </tr>
    </table>
    **

  • ALV ( How to save the output as Excel file whenever we runs the Report )

    Hi,
          Can any one please let me know , how we can automatically save a ALV Grid Display report in Excel Format in presentation server whenever we execute the Report.
    Regards
    Avi.

    Hi,
    This report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    Please note that this example maybe slow at filling the excel table
    (perhaps four fields per second on a 900 MHz machine - almost 30 seconds
    for a short example).
    To get the data on properties and methods - there is a bit of smoke and mirrors
    going on here; they are EXCEL properties and methods, not sap ones - so you need
    to look at excel help to determine how a particular function is structured. then
    build the block in sap, as shown in the example.
    If you only want to transfer the data to Excel like when you transfer the data from
    ALV to Excel simply use the Function Modules:
    XXL_SIMPLE_API
    If you want more modifications when you transfer it to Excel use:
    XXL_FULL_API
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • How to save data results into text file

    I want to solve an equation of degree 2 for example, and results are displayed in a text file

    Like many other software coding forums, we don't want to give hand outs.  We are more than happy to give hand ups.  Show that you've tried to figure out the problem and show us where you are stuck.  Then we will be glad to help you get you unstuck.  If we just give you an answer, you will learn nothing.
    As far as writing to a text file, look in the File I/O palette for the Write to Text File primitive.  Also, if you go to Help->Find Examples... and do a search for "text file" you will get some examples of how to use it.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Saving sql query result as excel file in different spreadsheets

    Hi,
    I have exported the output of sql into excel sheet as follow:
    SET LINESIZE 80
    SET PAGESIZE 0
    SET FEEDBACK OFF
    SET SPOOL ON
    SET TERMOUT OFF
    SPOOL current_employees.csv
    SELECT '"ID","Sales Amount","Region Id","Sales Date"' FROM dual;
    set colsep ,
    SELECT * FROM sales;
    SPOOL OFF
    But my question is how can I export SQL output in multiple excel spredsheets?
    Is there anything by which I can switch my spreadsheets through the above SQL script?
    Regards,
    Ashish

    Hi,
    I have exported the output of sql into excel sheet as follow:
    SET LINESIZE 80
    SET PAGESIZE 0
    SET FEEDBACK OFF
    SET SPOOL ON
    SET TERMOUT OFF
    SPOOL current_employees.csv
    SELECT '"ID","Sales Amount","Region Id","Sales Date"' FROM dual;
    set colsep ,
    SELECT * FROM sales;
    SPOOL OFF
    But my question is how can I export SQL output in multiple excel spredsheets?
    Is there anything by which I can switch my spreadsheets through the above SQL script?
    Regards,
    Ashish

  • Need SQL Query which saves query results to an excel file

    Hi,
    I am looking for a sql query which saves/ export results of an query to a excel file
    Thanks,
    Chetan

    I am looking for a sql query which saves/ export results of an query to a excel file
    Thanks,
    Chetan
    Options:
    1) You can use
    BCP command to export result to excel
    2) Insert into excel by using OPENROWSET
    3) Use Import and Export Wizard and provide SQL query as source and Excel as destination
    Please refer:
    http://stackoverflow.com/questions/87735/how-do-you-transfer-or-export-sql-server-2005-data-to-excel
    http://www.codeproject.com/Questions/617527/Export-sql-query-result-in-excel-file
    Cheers,
    Vaibhav Chaudhari
    [MCTS],
    [MCP]

Maybe you are looking for

  • Issue in Free Goods - I.C(TANN)

    Dear all, I have an issue while creating Free Goods. For the free goods item(TANN), the net price should not be there.when I create an order for Free Goods,net price is there. What is the cause for this? Thanks in Advance Regards Balaji

  • OBIEE 11.1.1.7 installation Issues - Fails on Creating a Domain

    Hi, I have completed all the steps mentioned in different posts in this forum regarding my error, but none of them helps. After comprehensive searching i have tried to install OBIEE with these steps also. 1st time installation: 1. Followed simple ste

  • Control or Option Click in Finder Problem

    Mouse click plus option Key, or Mouse Click with control key, all Icons on desktop disappear and reappear. Drive Icon moves, and new window appears. I have reinstalled OS 10.4, ran all updates, problem still exists. Problem does not exist in other lo

  • Error in data transfer

    Default contact does not exist in the BP contacs list (OCRD Aplication defined or objet defined error 65171

  • I am unable to install Flash Player

    I have failed several times to install the latest Flash Player 12. I am using Safari. Is that the problem in and of itself??? I followed the help suggestions for installing on a Mac. I successfully uninstalled the previous Flash Player. The dmg downl