1 Reply Latest reply on Feb 7, 2012 2:50 PM by Udo

    Native excel import of Office 2007+ XML-format


      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.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:98)
           at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:151)
           at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:317)
           at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:298)
           at oracle.dbtools.apex.hooks.fileUpload.ExcelToCollectionLoader.process(ExcelToCollectionLoader.java:66)
           at oracle.dbtools.apex.hooks.fileUpload.ExcelToCollectionLoader.processFile(ExcelToCollectionLoader.java:49)
           at oracle.dbtools.apex.hooks.ProcessorRegistry.fileUploadPreProcess(ProcessorRegistry.java:82)
           at oracle.dbtools.apex.FileUpload.loadFiles(FileUpload.java:52)
           at oracle.dbtools.apex.ModApex.doPost(ModApex.java:121)

      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?