Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    42

    Unanswered: Import an excel sheet

    Hi ,
    Is there a way i can import or insert an excel sheet data to an oracle table.
    is there a software can help in this issue or a command to do so.

    Thanks

  2. #2
    Join Date
    Apr 2003
    Location
    London, England
    Posts
    42

    try Oracle 9i External table feature

    I have used the (new to 9i) feature of defining a Spreadsheet as an 'External' table.

    I remember I had to login as sysadmin to create a directory to put the Spreadsheet but everything else was straightforward.

    Then you can use SQL to manipulate the data in the usual way.

    Barry Williams
    Principal Consultant
    Database Answers

  3. #3
    Join Date
    Feb 2004
    Location
    Sweden
    Posts
    8

    Excel and UTF-8

    Hi.

    Will the external table feature handle UTF-8 data properly?

    We have an Excel file with some VBA code in it which uses SQL to insert,update or delete rows in a table. However, historically, we have had problems with UTF-8 strings.

    Regards
    Magnus

  4. #4
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482
    You can export the Excel spreadsheet to CSV file and then load it with SQL*Loader. It's the same with a external table.

    For SQL*Loader you have to create the control file to map the columns and their datatypes, then load the data. Example:


    load.ctl
    ------------

    LOAD DATA
    INFILE 'ulcase2.dat'
    INTO TABLE emp
    (empno POSITION(01:04) INTEGER EXTERNAL,
    ename POSITION(06:15) CHAR,
    job POSITION(17:25) CHAR,
    mgr POSITION(27:30) INTEGER EXTERNAL,
    sal POSITION(32:39) DECIMAL EXTERNAL,
    comm POSITION(41:48) DECIMAL EXTERNAL,
    deptno POSITION(50:51) INTEGER EXTERNAL)



    $ sqlldr USERID=scott/tiger CONTROL=load.ctl LOG=ulcase2.log



    HTH,

    clio_usa - OCP 8/8i/9i DBA

  5. #5
    Join Date
    Jun 2004
    Posts
    42
    Thank you all.

Posting Permissions

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