Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I am developing a project in JAVA OTK PTC Creo. I want to add data reading from Excel to the application. For this I am using POI 5.2.3 (xmlBean 5.1.1). Debug showed that the problem is in some resource, but this resource is in xmlBean, I have shuffled this resource everywhere, but no effect. For 36 hours I've been looking for a way out and I can't find it.
SRC
Locale.setDefault(new Locale("en", "US"));
XSSFWorkbook workBook = new XSSFWorkbook(inp); <-- there is
Error
java_app_classpath
y:\creo1\apps\creo\creo.jar
;y:\creo1\apps\creo\lib\xmlsec-3.0.0.jar
;y:\creo1\apps\creo\lib\excel-streaming-reader-4.0.5.jar
;y:\creo1\apps\creo\lib\poi-scratchpad-5.2.3.jar
;y:\creo1\apps\creo\lib\commons-beanutils-1.9.4.jar
;y:\creo1\apps\creo\lib\commons-codec-1.15.jar
;y:\creo1\apps\creo\lib\commons-collections4-4.4.jar
;y:\creo1\apps\creo\lib\commons-compress-1.23.0.jar
;y:\creo1\apps\creo\lib\commons-lang3-3.12.0.jar
;y:\creo1\apps\creo\lib\commons-math3-3.6.1.jar
;y:\creo1\apps\creo\lib\commons-text-1.10.0.jar
;y:\creo1\apps\creo\lib\curvesapi-1.07.jar
;y:\creo1\apps\creo\lib\poi-5.2.3.jar
;y:\creo1\apps\creo\lib\poi-ooxml-5.2.3.jar
;y:\creo1\apps\creo\lib\xmlbeans-5.1.1.jar
;y:\creo1\apps\creo\lib\commons-io-2.11.0.jar
;y:\creo1\apps\creo\lib\SparseBitSet-1.2.jar
;y:\creo1\apps\creo\lib\log4j-api-2.18.0.jar
;y:\creo1\apps\creo\lib\ooxml-schemas-1.4.jar
;y:\creo1\apps\creo\lib\poi-ooxml-full-5.2.3.jar
Error
<java.util.MissingResourceException: Can't find bundle for base name org.apache.xmlbeans.impl.regex.message, locale>
if I use this design:
InputStream is = new FileInputStream("D:\\test\\styleTest.xlsx");
Workbook workbook = WorkbookFactory.create(is);
Then the error is like this:
Class not loaded : org.apache.poi.ss.usermodel.WorkbookFactory$Singleton
Try to set the system variable CLASSPATH, as mentioned in
https://community.ptc.com/t5/Customization/Using-Apache-POI-with-Java-OTK-for-Creo/m-p/790476