Apache POI - Read excel

I’m assuming there are users out there that have successfully used the Apache POI to read an excel file. I’ve uploaded the 3 poi-.jar files into the code/jars path of the package. In my java service, I’ve also include the Imports information in the Shared tab section. I currently have org.apache.poi.hssf.usermodel. as one of the import. During compilation, I’m getting package org.apache.poi.hssf.usermodel.* does not exist. Hopefully, I’m missing something really simple. Yes, I’ve reloaded the package. Just wondering if anyone had any luck. Thanks.

It’s been a while so my memory may be faulty. Put the jars in code/jars/static. Then you may need to restart IS to get the classpath set right.

I hope that works. :slight_smile:

Hi Reamon,

I don’t believe there’s a code/jars/static subfolder. I think it’s just …/IntegrationServer/packages/package_name/code/jars path. It’s my understanding that if the jar files are not needed by any other packages, then place the jar file(s) in the code/jars path and just need to reload the package without the need to restart IS. Please correct me if that’s incorrect.

You can create a static folder and put your jar file there.

Cheers
Guna

I’m playing around with the Excel_contentHandler package in the software section and am having a similar problem. The link to the jars has expired so I have grabbed what I believe to be the correct jars. Which are now at version 3.5. But the package only does a partial load with the following errors. I have place the jars in all the locations mentioned but the problem persist.

EXCEL_contentHandler.util:MSExcelWorkSheetToRecord java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
EXCEL_contentHandler.util:createExcelRecord java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
EXCEL_contentHandler.util:MSExcelDocumentToRecord java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook