This content has been marked as final. Show 6 replies
1- i figured out that this "nothing happens" means that the file is opened , but sure i can not see it .
is this the ordinary thing ?
2- i am trying to use text_io.get_line , and it can read the first line of the .txt file , but there are two problems here :
1- i want to read a .xlsx file , and when i try to do so , i get something strange , it is not an error ,
it is "PK000" ,
my code is :
linebuf varchar2(90) ;
x := Text_IO.Fopen('f:\book1.xlsx ', 'R');
end if ;
i think it reads the line as encrypted or something because my first field in the excel sheet contains "h" charachter , nothing else .
second problem : i need to read the last record .
thanks a lot
and ZIP file signature starts always with two chars PKwhy it reads the signature , not the file content , especially if the file is already opened ?
by the way , the situation is changed now . i saved my excel file in .csv format , and the code works fine with it , but
by big problem is : i need to read the very last record each time i press a button and assign the excel record to a record on my form ??? this is the big problem i am facing , how to read the last record and assign it to my form's record or to my database table , ??? then i can query it from my form .
can not i do this with "sql loader" ? can i restrict records with "sql loader" to get the latest record entered based on
sysdate for instance ?
Edited by: semsem on Dec 31, 2012 5:36 AM
Edited by: semsem on Dec 31, 2012 5:51 AM
why it reads the signature , not the file content , especially if the file is already opened ?
Cause file signature is a part of file :) .Try open *.xlsx file in any text editor (e.g. Notepad) then you'll see at first two position letters P and K
Regarding last row extraction: there is another your thread when I suggest to create external table from your file - try to use solution I wrote