Excel File to Oracle data.
Follow these steps
Excel -> CSV -> Oracle
1.Save the Excel spreadsheet as file type 'CSV' (Comma-Separated
Values).
2.Transfer the .csv file to the Oracle server (usually HP Unix).
3.Create the Oracle table, using the SQL CREATE TABLE statement to
define the table's column lengths and types. Here's an example of an
sqlplus 'CREATE
TABLE' statement:
CREATE TABLE T_ACCT
(acct_id VARCHAR2(18),
balance NUMBER(13),
prepay number(13));
4.Use sqlload to load the .csv file into the Oracle table. Create a
sqlload control file like this:
load data
infile T_ACCT.csv
replace
into table T_ACCT
fields terminated by ','
(acct_id,balance,prepay)
5.Invoke sqlload to read the .csv file into the new table, creating one
row in the table for each line in the .csv file. This is done as a Unix
command:
% sqlload userid=username/password control=<filename.ctl>
log=<filename>.log
This will create a log file <filename>.log. Check it for loading
errors.
6.Use these sqlplus commands to check the Oracle table:
DESCRIBE T_ACCT;
SELECT COUNT(*) FROM T_ACCT ;
SELECT * FROM T_ACCT WHERE ROWNUM <5;
7.You're done.