Included the following libraries:
..\lib\ooxml-schemas-1.4.jar;..\lib\poi-ooxml-5.0.0.jar;..\lib\poi-5.0.0.jar;..\lib\ooxml-lib\xmlbeans-4.0.0.jar;..\lib\lib\commons-collections4-4.4.jar;..\lib\commons-compress-1.20.jar
I am trying to create and excel file and write into it. It compiles ok. However when I run, get a "No such method error". I notice that CTFont.class exists in ooxml-schemas-1.4.jar. Want to know in which version I can find, CTFont.addNewFamily().
Exception in thread "main" java.lang.NoSuchMethodError: 'org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontFamily org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont.addNewFamily()'
at org.apache.poi.xssf.usermodel.XSSFFont.setFamily(XSSFFont.java:635)
at org.apache.poi.xssf.usermodel.XSSFFont.setFamily(XSSFFont.java:647)
at org.apache.poi.xssf.model.StylesTable.createDefaultFont(StylesTable.java:765)
at org.apache.poi.xssf.model.StylesTable.initialize(StylesTable.java:716)
at org.apache.poi.xssf.model.StylesTable.<init>(StylesTable.java:130)
at org.apache.poi.ooxml.POIXMLFactory.newDocumentPart(POIXMLFactory.java:94)
at org.apache.poi.ooxml.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:591)
at org.apache.poi.ooxml.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:500)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(XSSFWorkbook.java:465)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:255)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:249)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:237)
at WriteDataToExcel.main(WriteDataToExcel.java)