I installed these 4 jar files in UfsServer\tomcat\webapps\ufs\WEB-INF\lib and restarted the server
poi-3.17.jar
poi-excelant-3.17.jar
poi-ooxml-3.17.jar
poi-ooxml-schemas-3.17.jar
I created a simple script which has the following code:
Code: Select all
importPackage(com.ebasetech.xi.api);
importPackage(com.ebasetech.xi.services);
importPackage(Packages.org.apache.poi);
importPackage(Packages.org.apache.poi.hssf.usermodel);
importPackage(Packages.org.apache.poi.xssf.usermodel);
var workbook = HSSFWorkbook();
var sheet = workbook.createSheet("Countries");
var row = sheet.createRow(0);
var cell0 = row.createCell(0);
cell0.setCellValue("U.S.A.");
var fos = new FileOutputStream("Countries.xls");
workbook.write(fos);
fos.close();
workbook.close();
If I change
Code: Select all
var workbook = HSSFWorkbook();
Code: Select all
var workbook = XSSFWorkbook();
Code: Select all
org/apache/commons/collections4/ListValuedMap
Code: Select all
var workbook = Packages.org.apache.poi.xssf.usermodel.XSSFWorkbook();
Using the full package for HSSFWorkbook works fine.
Does anyone know why this is happening ?
Edit: After searching online I found the answer that fixed this issue.
Verj comes with a JAR library called commons-collections-3.2.1.jar. I downloaded version 4.2 from https://commons.apache.org/proper/commo ... ctions.cgi and added it to VerjIO\UfsServer\tomcat\webapps\ufs\WEB-INF\lib leaving commons-collections-3.2.1.jar there as well and I am now able to create XLSX files.