This discussion is archived
1 Reply Latest reply: Feb 7, 2012 6:50 AM by Udo RSS

Native excel import of Office 2007+ XML-format

j.gauger Newbie
Currently Being Moderated

i've configured the xls2collection functionality in the Apex Listener and it's working fine with OLE2-based excel files but not with the "new" Office 2007+ XML.

I read in an blog posting of Kris Rice that either the xls or xlsx format will be processed. But if i try to upload a xlsx file the apex listener throws an exception like this:

Aug 30, 2011 9:09:39 AM com.sun.grizzly.http.servlet.ServletAdapter doService
SEVERE: service exception:
org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (eg XSSF instead of HSSF)
     at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(
     at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(
     at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(
     at oracle.dbtools.apex.hooks.fileUpload.ExcelToCollectionLoader.process(
     at oracle.dbtools.apex.hooks.fileUpload.ExcelToCollectionLoader.processFile(
     at oracle.dbtools.apex.hooks.ProcessorRegistry.fileUploadPreProcess(
     at oracle.dbtools.apex.FileUpload.loadFiles(
     at oracle.dbtools.apex.ModApex.doPost(

If i understand the message right, it's generally possible to import the xml-style excel format if using the correct "part of the POI" (XSSF).

Is this already implemented? If yes, what do i have to do to call this?



  • Correct Answers - 10 points
  • Helpful Answers - 5 points