Link to home
Start Free TrialLog in
Avatar of rehman123
rehman123

asked on

load excel data into orcale table without converting it into csv or txt

I want to populate oracle table with excel file. if somebody have exact coding to insert excel file record into orcale table plz answer me as soon as poosible. here i want to clear it i dont want to use sql loader to upload data from csv file or txt file. so please dont suggest me to save excel file into csv or txt and using sql loader load that data into oracle table. only and only i want to load data of excel(*.xls) file into orcale table.
Avatar of Ora_Techie
Ora_Techie

Well, to my knowledge, the answer is NO...you can't do that without using SQL*Loaded (or External Tables, if you are using 9i).
Ohh wait....here are couple of ways:

I Also a tool to do that on:

http://www.oraxcel.com/projects/sqlxl/index.htm


Also From
http://asktom.oracle.com/pls/ask/f?p=4950:8:4026090959248828264::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:243814703172,

There are a couple of ways to approach this.

1) load the excel spreadsheet into the database "as is".  You can use interMedia
text to convert the .xls file into a .htm file (HTML) or use iFS (see
http://technet.oracle.com/
for
more info on that) to parse it as well.  InterMedia text will convert your XLS
spreadsheet into a big HTML table (easy to parse out what you need at that
point)

2) Using OLE automation, a program you write can interact with Excel, request
data from a spreadsheet, and insert it.  Oracle Forms is capable of doing this
for example as is other languages environments.  In this fashion, you can remove
the "manual" and "sqlldr" parts -- your program can automatically insert the
data.

3) You can write a VB script that uses ODBC or Oracle Objects for OLE (OO4O) in
Excel.  This VB script would be able to put selected data from the spreadsheet
into the database.  We would recommend OO4O.  It provides an In-Process COM
Automation Server that provides a set of COM Automation interfaces/objects for
connecting to Oracle database servers, executing queries and managing the
results.  OO4O is available from

http://technet.oracle.com

One more option (Oracle 8.1.6) is to use Heterogenious Services Generic Connectivity to query .xls thru
ODBC connection.

http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76960/hs_genco.htm#173
in the document "Oracle8i Distributed Database Systems" of the Oracle 8.1.6 Documentation


The best way to get data from Oracle to Excel is
through ODBC connection which is very easy to setup.
And then there are literally 3 lines of code that you
put right into your Excel file.
 This gets any data into Excel without any middle files
or Text files or etc. Meanwhile you
can ask your network Administrator to setup ODBC to your Oracle
database.

@rehman:

there is a 3rd party API in JAVA that can read and load excel to oracle database.

do you know java?
How many excel files your are trying to handle?. If they are few 10s You can simply try using Microsoft Query which usually comes with MS Excel to load the data.

MS Excel -> Data -> Get External Data -> New database Query : This will give you save option...

-R
Avatar of rehman123

ASKER

actually i  dont want to use any third party tool. just i am trying and i want to populate oracle table with excel file using d2k. if some body have any exact solution pls  give me feedback otherwise  no need to give me any suggestion.

suppose
i have excel file like this
------------------------------
dept.xls

deptno
100
200
300
-----------------------------------------------
orcale table is like this

xldept
deptno varchar2(4);

now just tell me how to insert excel records in xldept using d2k.
ASKER CERTIFIED SOLUTION
Avatar of oleggold
oleggold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial