How to I convert data from oracle database into excel sheet

how to I convert data from oracle database into excel sheet.
I need to import columns and there datas from oracle database to microsoft excel sheet.
Please let me know the different ways for doing this.
Thanks.

asktom.oracle.com has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.
Justin

Similar Messages

  • How I can transfer data from the database into a variable (or array)?

    I made my application according to the example (http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/). Everything works fine. I changed one function to query the database - add the two parameters and get the value of the table in String format. A test operation shows that all is ok. If I want to display this value in the text area, I simply drag and drop service to this element in the design mode
    (<s:TextArea x="153" y="435" id="nameText" text="{getDataMeanResult.lastResult[0].name}"  width="296" height="89"  />).
    It also works fine, just a warning and encouraged to use ArrayCollection.getItemAt().
    Now I want to send the value to a variable or array, but in both cases I get an error: TypeError: Error #1010: A term is undefined and has no properties..
    How can I pass a value from the database into a variable? Thank you.
    public var nameTemp:String;
    getDataMeanResult.token = authors.getDataMean(arrayOfNumber[0], dir_id);
    nameTemp = getDataMeanResult.lastResult[0].name;
    public var nameArray:Array = new Array();
    for (var i:uint=o; i<3; i++){
    getDataMeanResult.token = authors.getDataMean(arrayOfNumber[i], dir_id);
    nameArray[i] = getDataMeanResult.lastResult[0].name;
    And how i can use syntax highlighting in this forum?

    Astraport2012 wrote:
    I have to go back to the discussion. The above example works fine when i want to get a single value of the database. But i need to pass an array and get an array, because i want to get at once all the values for all pictures tooltips. I rewrote the proposed Matt PHP-script and it works. However, i can not display the resulting array.
    yep, it won't work for Arrays, you'll have to do something slightly more intelligent for them.
    easiest way would be to get your PHP to generate XML, then read that into something like an ArrayList on your HTTPService result event (depends what you're doing with it).
    for example, you could have the PHP generate XML such as:
    <pictures>
         <location>test1.png</location>
         <location>test2.png</location>
         <location>test3.png</location>
         <location>test4.png</location>
         <location>test5.png</location>
         <location>test6.png</location>
    </pictures>
    then you'll read that in as the ResultEvent, and perform something like this on it
    private var tempAC:ArrayList = new ArrayList
    protected function getStuff_resultHandler(event:ResultEvent):void
        for each(var item:Object in event.result.pictures)
           var temp:String = (item.@location).toString();
           tempAC.addItem(temp);
    in my example on cookies
    http://www.mattlefevre.com/viewExample.php?tut=flash4PHP&proj=Using%20Cookies
    you'll see an example of how to format an XML structure containing multiple values:
    if($_COOKIE["firstName"])
            print "<stored>true</stored>";
            print "<userInfo>
                    <firstName>".$_COOKIE["firstName"]."</firstName>
                    <lastName>".$_COOKIE["lastName"]."</lastName>
                    <userAge>".$_COOKIE["userAge"]."</userAge>
                    <gender>".$_COOKIE["gender"]."</gender>
                   </userInfo>";
        else
            print "<stored>false</stored>";
    which i handle like so
    if(event.result.stored == true)
                        entryPanel.title = "Welcome back " + event.result.userInfo.firstName + " " + event.result.userInfo.lastName;
                        firstName.text = event.result.userInfo.firstName;
                        lastName.text = event.result.userInfo.lastName;
                        userAge.value = event.result.userInfo.userAge;
                        userGender.selectedIndex = event.result.userInfo.gender;
    depends on what type of Array you're after
    from the sounds of it (with the mention of picture tooltips) you're trying to create a gallery with an image, and a tooltip.
    so i'd probably adopt something like
    <picture>
         <location>example1.png</location>
         <tooltip>tooltip for picture #1</tooltip>
    </picture>
    <picture>
         <location>example2.png</location>
         <tooltip>tooltip for picture #2</tooltip>
    </picture>
    <picture>
         <location>example3.png</location>
         <tooltip>tooltip for picture #3</tooltip>
    </picture>
    etc...
    or
    <picture location="example1.png" tooltip="tooltip for picture #1"/>
    <picture location="example2.png" tooltip="tooltip for picture #2"/>
    <picture location="example3.png" tooltip="tooltip for picture #3"/>
    etc...

  • Store data from a table into excel sheet and email

    Hi all,
    I am just wondering, i m not sure where to start. I want to insert data from a table into an excel spread sheet.
    I'm working on a stored procedure with 3 input parameters:
    1. the actual query
    2. userid
    3. the column headers (comma separated) - these will be in the same order as the outer select statement in the query itself. I will use the column headers for the respective columns in Excel worksheet.
    When the proc is executed, the excel is populated. If the record count is > 65536, then I need to create multiple worksheets in the same excel file.
    How can i do that? Can any body please help with this..?

    We are doing like this ( Not sure whether it is the best method available)
    --Get the output of the query (Since the number of columns is not fixed you would have to use dbms_sql package)
    --loop through the output and write into a file, for example test.csv, using UTL_FILE package
    --load the file into a blob variable(we are doing it by loading it into a table)
    --For mailing You can use the below package
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    Mailing code we are using is given below:
    CREATE OR REPLACE procedure xls_mail(
        p_sender     varchar2, -- sender, example: 'Me <[email protected]>'
        p_recipients varchar2, -- recipients, example: 'Someone <[email protected]>'
        p_subject    varchar2, -- subject
         p_text           varchar2, -- text
         p_filename      varchar2, -- name of xls file
         p_blob           blob         -- xls file
    ) is
      conn      utl_smtp.connection;
      i number;
      len number;
    BEGIN
      conn := demo_mail.begin_mail(
        sender     => p_sender,
        recipients => p_recipients,
        subject    => p_subject,
        mime_type  => demo_mail.MULTIPART_MIME_TYPE);
      demo_mail.begin_attachment(
        conn         => conn,
        mime_type    => 'application/xls',
        inline       => TRUE,
        filename     => p_filename,
        transfer_enc => 'base64');
        -- split the Base64 encoded attachment into multiple lines
       i   := 1;
       len := DBMS_LOB.getLength(p_blob);
       WHILE (i < len) LOOP
          IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
             UTL_SMTP.Write_Raw_Data (conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_blob, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
          ELSE
             UTL_SMTP.Write_Raw_Data (conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_blob, (len - i)+1,  i)));
          END IF;
          UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
          i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
       END LOOP;
      demo_mail.end_attachment(conn => conn);
      demo_mail.attach_text(
        conn      => conn,
        data      => p_text,
        mime_type => 'text/html');
      demo_mail.end_mail( conn => conn );
    END;

  • How can i convert data from DBF to oracle database 10g?

    Sir,
    How can i convert data from DBF to oracle database 10g?

    I assume you at least know how to dump the contents of foxpro dbf file into CSV format.
    Regarding SQL*Loader, hope this demo makes it a bit clear to you...
    http://www.princeton.edu/~storacle/sqlloader_demo.shtml
    I agree that it is an old web page (references Oracle 8.0.5) but basics remain the same.
    If it is still unclear to you after referring above link, then get an Oracle consultant.

  • How to extract data from oracle database directly in to bi7.0 (net weaver)

    how to extract data from oracle database directly in to bi7.0 (net weaver)? is it something do with EDI? can anybody explain me in detail?
    Thanks
    York

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • How to send a mail automatically based on a date from ORACLE database

    Hi,
    I want to send a mail automatically based on a date from ORACLE database.
    Please help me.
    thanks
    --Sara                                                                                                                                                                                                                                   

    programs are available on net to send mail directly from oracle ie procedure s in oracle sending mails

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • How to Transfer the Data from ORACLE APPS to SAP

    Hi Gurus,
    Here are my couple of quieries regarding Data Migration from Legacy(Oracle Apps) to SAP.
    1. How to link between Legacy system(ORACLE APPS) and SAP ?
    2. How to migrate the data from Oracle tables to SAP directly, instead of loading the flat files(.txt, .xls) ?
    Please respond to my queries ASAP.
    Thanks,
    SAPSURE.
    Edited by: sapsure on Sep 9, 2010 11:39 AM
    Edited by: sapsure on Sep 10, 2010 2:32 PM

    1. How to link between Legacy system(ORACLE APPS) and SAP ?
            If you have SAP PI in place then you can interact with oracle database tables directly from PI and then data can be posted to SAP transactions through IDocs/BAPIs.
            If you did not have SAP PI still you can do JDBC connection directly from ABAP program. Not sure about the exact steps check in forum.
    2. How to migrate the data from Oracle tables to SAP directly, instead of loading the flat files(.txt, .xls) ?
            If you want to directly post the data SAP transactions (I hope not directly to SAP tables) then connection needs to establish through ABAP program or Via. PI.
    Regards,

  • FETCH DATA FROM ORACLE DATABASE USING Web Dynpro

    I want to fetch data from ORACLE database using Web Dynpro.How can I do this?

    1) Are you sure that you get no results? It sounds like you are having name resolution issues, which would imply that you should be getting an ORA-00942 error indicating that the table doesn't exist (or that you don't have access to the table). If you are not seeing this error, I would tend to suspect an overzealous exception handler.
    2) What database account owns the table? What database account is your ASP.Net application using to connect? Assuming these two accounts are different, your application would either have to
    - Explicitly prefix the table name with the schema name
    - Have a public or private synonym that maps the table name to the fully qualified identifier schema_name.table_name
    - Issue the command ALTER SESSION SET CURRENT_SCHEMA = <<schema name>> in each session, in which case all queries in the session would use the specified schema name as the default if no schema name is prefixed.
    Justin

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • How to copy the Data From Oracle Table To SAP Table

    Hi Friends,
    We need to copy the data from Oracle Database Table to SAP Table. The data should be updated simultaneously in both tables . Should I write a program that contains the native sql statement like EXEC SQL PERFORMING WRITE,....
    I appreciate any suggestions regarding this.
    Regards
    CSM Reddy

    Hi,
    since you posted this question in the DB2 forum I assume that you are using a DB2 database for your SAP system.
    To access a table from a legacy ORACLE database you may use the DBSL multiconnect feature. I.e. you open a secondary connecction in the SAP system to your ORALE database. You can then ready the data from the ORACLE database into an ABAP internal table and insert it afterwards into the DB2 table on the main connection.
    Another way to access an ORACLE table from a DB2 database is to use the DB2 federated database feature. This requires a little bit more DB2 skill. With this feature you can make the ORACLE table visible within the DB2 database. To copy data you can then simply use a "INSERT ... SELECT" statement. 
    Regards
             Frank

  • Walkthrough: Displaying Data from Oracle database in a Windows application.

    This article is intended to illustrate one of the most common business scenarios such as displaying data from Oracle database on a form in a Windows application using DataSet objects and .NET Framework Data Provider for Oracle.
    You can read more at http://www.c-sharpcorner.com/UploadFile/john_charles/WalkthroughDisplayingDataOracleWindowsapplication05242007142059PM/WalkthroughDisplayingDataOracleWindowsapplication.aspx
    Enjoy my article.

    hi,
    this is the code :
    public class TableBean {
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    public List getperInfoAll() {
    int i = 0;
    try
    con = DriverManager.getConnection("url","root","root");
    ps = con.createStatement();
    rs = ps.executeQuery("select * from user");
    while(rs.next()){
    System.out.println(rs.getString(1));
    perInfoAll.add(i,new perInfo(rs.getString(1),rs.getString(2),rs.getString(3)));
    i++;
    catch (Exception e)
    System.out.println("Error Data : " + e.getMessage());
    return perInfoAll;
    public class perInfo {
    String uname;
    String firstName;
    String lastName;
    public perInfo(String firstName,String lastName,String uname) {
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    public String getUname() {
    return uname;
    public String getFirstName() {
    return firstName;
    public String getLastName() {
    return lastName;
    ADF table code:
    <af:table value="#{tableBean.perInfoAll}" var="row"
    binding="#{backing_Display.table1}" id="table1">
    <af:column sortable="false" headerText=""
    align="start">
    <af:outputText value="#{row.firstName"/>//---> Jdeveloper 11g doesn't allow me to use this.. it says firstName is an unknown property..
    </af:column>
    </af:table>
    Please tell me is this the way to do it.. or is it a must to use the DataCollection from the data controls panel...
    Thanks...

  • How can i extract data from oracle table  to flat file or excel spread shee

    Hello,
    DB Version is 10.1.0.3.0
    How can i extract data from oracle table to flat file or excel spread sheet by using sub programs?
    Regards,
    D

    Here what I did
    SET NEWPAGE 0
    SET SPACE 0
    SET LINESIZE 80
    SET PAGESIZE 0
    SET ECHO OFF
    SET FEEDBACK OFF
    SET VERIFY OFF
    SET HEADING OFF
    SET MARKUP HTML OFF SPOOL OFF
    Sql> SPOOL bing
    select * from -------;
    SPOOL OFF;
    I do not see file.
    I also tried
    Sql> SPOOL /tmp/bing
    select * from -------;
    SPOOL OFF;
    But still not seeing the fie,

  • To fetch data from Oracle Database

    Hi Gents,
    Any alternative option other than SQL to fetch data from Oracle DAtabase. ( My manager worked on Mainframes he is telling other than SQL there should be some options.. Gents pls guide if any options.......
    REgards
    Fento

    >
    Any alternative option other than SQL to fetch data from Oracle DAtabase. ( My manager worked on Mainframes he is telling other than SQL there should be some options.. Gents pls guide if any options.......
    >
    There is no other (supported) way to get data from Oracle Databases as SQL. No matter what third-party tool you use to access Oracle Databases, they all will use (embedded) SQL.
    In very rare cases, one must use tools to read from datafiles directly because the database got damaged and a proper recovery is impossible. That is an emergency solution and by no means a replacement for SQL access.
    In short: No :-)
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • Want to see on screen data from oracle database using php

    I am struggling on the problem of echoing data from Oracle database (9i) to the screen for viewing. For ex. the data has records from various cities. when a particular city is inputted as prompt, all the records for the that city from the table should appear through PHP. Can someone help me?

    Thank you very much for giving the link. I tried and it is working. Only, I am still struggling with trying to get many fields from the database on the screen for viewing. Ex. a prompt to ask which country and which month. If I give India and December it must give all the data pertaining to India for December. This AJAX was very useful, as it gave lot of tips, but my basic query to see the data thru PHP from my database is still unsolved. Any help??
    Jacob
    Thanks once again for the help.

Maybe you are looking for