URGENT urgent [message #80206] |
Fri, 23 August 2002 05:16 |
JN
Messages: 2 Registered: October 2001
|
Junior Member |
|
|
Hi friends,
I want to read data from excel file. can any one help me?
i am in a very urgent position
can any one help me providing with code.
|
|
|
Re: URGENT urgent [message #80211 is a reply to message #80206] |
Fri, 23 August 2002 22:38 |
Victoria
Messages: 152 Registered: July 2002
|
Senior Member |
|
|
Hi,
you can use the following code.Make sure that you save xls file as .csv in the unix directory and this path should be included as UTL_FILE_DIR in initora file.
create or replace procedure proc1
IS
p_file_name VARCHAR2(20) := 'sox';
p_file_dir VARCHAR2(30) := '/export/home/vic';
v_file_handle UTL_FILE.FILE_TYPE;
BEGIN
v_file_handle := UTL_FILE.FOPEN(p_file_dir,p_file_name,'r');
LOOP
UTL_FILE.GET_LINE(v_file_handle,variable);
Place your logic here-----
END LOOP;
UTL_FILE.FCLOSE(v_file_handle);
end
Good luck
Victoria
|
|
|