Comments on: Read an Excel xlsx with PL/SQL http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/ Friends of Oracle and Java Thu, 30 Oct 2014 05:50:12 +0000 hourly 1 http://wordpress.org/?v=4.0 By: Steven Holley http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7828 Wed, 06 Aug 2014 16:55:16 +0000 http://technology.amis.nl/?p=20612#comment-7828 Anton,
This is an excellent package that has saved me countless hours. I have only run into one problem. When reading values from the spreadsheet using the following command – select *
from table( as_read_xlsx.read( as_read_xlsx.file2blob( gv_directory, p_filename ) ) ) – if there are two consecutive null cells in the row, the second one does not show up in the returned data set. Is there any way to fix this?

Thanks for your time
Steve

]]>
By: Martin Goblet http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7671 Mon, 19 May 2014 05:40:44 +0000 http://technology.amis.nl/?p=20612#comment-7671 Many thanks.

]]>
By: Sokratis Aristovoulidis http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7668 Fri, 16 May 2014 23:39:00 +0000 http://technology.amis.nl/?p=20612#comment-7668 Many thanks for sharing!!

]]>
By: Anton Scheffer http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7667 Fri, 16 May 2014 21:55:42 +0000 http://technology.amis.nl/?p=20612#comment-7667 @Martin Goblet
I’ve added rounding to the package.
The formula’s are empty because it are “shared” formula’s. Something I didn’t know about before, and that’s not handled (yet)

]]>
By: Martin Goblet http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7664 Wed, 14 May 2014 09:06:22 +0000 http://technology.amis.nl/?p=20612#comment-7664 Hi Anton

Many thanks for this code, it saved me a lot of time.

Just 2 points where I’ve some trouble with.
– Numbers appears like this 0.82280000000000009 instead of 0.8228. There are some false decimals at the end. Workaround I use is a round(), because I know the expected decimals in this field.
– I’ve a worksheet (link placed in the website) with a formula in a column (for each row). I only get the formula from the first row, the others are null.

Regards
Martin

]]>
By: regrbde http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7658 Fri, 09 May 2014 06:57:52 +0000 http://technology.amis.nl/?p=20612#comment-7658 don’t know if I sent the code yet, but I sent a mail today

Regards
Ralph (regrbde)

]]>
By: critian http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7635 Mon, 28 Apr 2014 14:53:55 +0000 http://technology.amis.nl/?p=20612#comment-7635 Anton Scheffer you sent or explain like work in xls…greetings you are the best.

]]>
By: critian http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7634 Mon, 28 Apr 2014 14:24:33 +0000 http://technology.amis.nl/?p=20612#comment-7634 what is your email.
My email is netzaq80@gmail.com

]]>
By: critian http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7633 Mon, 28 Apr 2014 14:07:04 +0000 http://technology.amis.nl/?p=20612#comment-7633 what is your twitter

]]>
By: Cristian http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7601 Wed, 09 Apr 2014 17:13:17 +0000 http://technology.amis.nl/?p=20612#comment-7601 Hola Anton
Una consulta, cuando mando a listar me lista pero con data repetida
Gracias

]]>
By: Nicolas DENIS http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7599 Wed, 02 Apr 2014 15:49:54 +0000 http://technology.amis.nl/?p=20612#comment-7599 Hello,

I did do a quick improvement to the code.
When you put by mistake a large file (did test with a 500K text file) that is NOT a excel file, the get_file take pretty long time to return nothing.

I did add this at the beginning of the get_file function:
BEGIN
IF dbms_lob.substr(p_zipped_blob, 4, 1) = hextoraw(‘504B0304′) THEN
….
END IF;
RETURN NULL;
END;

To test the ZIP Header signature. If not a ZIP file, I simply ignore the request. (I could have add an exception but was not required).

I did also add a function to test if the file look like a valid Excel file:

FUNCTION testFile(p_xlsX BLOB) RETURN VARCHAR2 IS
cTest BLOB;
BEGIN
cTest := get_file(p_xlsx, ‘xl/workbook.xml’);
IF cTest IS NULL THEN
RETURN ‘N';
ELSE
RETURN ‘Y';
END IF;
END;

Otherwise, Thanks for this useful piece of code!

]]>
By: Anton Scheffer http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7591 Tue, 25 Mar 2014 19:46:14 +0000 http://technology.amis.nl/?p=20612#comment-7591 @Jackson. No, I don’t have a package which can do something similar with xls files.

]]>
By: Jackson http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7590 Tue, 25 Mar 2014 01:09:42 +0000 http://technology.amis.nl/?p=20612#comment-7590 Hi, you could use xls?

]]>
By: Jackson http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7589 Tue, 25 Mar 2014 01:04:12 +0000 http://technology.amis.nl/?p=20612#comment-7589 hi you got something to xls

]]>
By: Jackson http://technology.amis.nl/2013/01/19/read-a-excel-xlsx-with-plsql/#comment-7588 Mon, 24 Mar 2014 23:37:08 +0000 http://technology.amis.nl/?p=20612#comment-7588 Hi thanks for the very good example, but you have a package with the same example reading xls?

]]>