Posts

Showing posts from 2025

Process and read xlsx from PL/SQL

To read a XLSX-file from PL/SQL can be a bit challenging. One option is to rename the file to .ZIP and then process it from from there. An XLSX-file is actually ZIP archiv es internally. Microsoft Office formats after 2007 (the "Open XML" formats) are structured as a collection of XML files and resources (like images, styles, and document parts) bundled inside a ZIP archive. When you rename file.xlsx → file.zip , you can then: Open it with a ZIP program (like WinRAR, 7-Zip, or even Windows Explorer). Browse its contents — you'll see folders like xl/ , docProps/ , and _rels/ , and files like [Content_Types].xml . Extract parts — e.g., images, embedded objects, raw XML data. But, if you are going to process a single tab document it easier to save the document as CSV and then process it as an external table. How do you then save the XLSX-file as CSV with PL/SQL and read it? Below is instructions on how to do it on Linux. Create a java stored procedure that can ...