Jibu
6 years agoOccasional Contributor
HOW TO READ EXCEL FILE IN GROOVY
I am reading an excel file like below using poi3.6 jars
commons-collections4-4.1.jar
commons-collections4-4.1-javadoc.jar
commons-compress-1.18.jar
poi-3.16.jar
poi-examples-3.16.jar
poi-excelant-3.16.jar
poi-ooxml-3.16.jar
poi-ooxml-schemas-3.16.jar
poi-scratchpad-3.16.jar
FileInputStream file = new FileInputStream(new File('D:\\sample.xls'));
XSSFWorkbook workbook1 = new XSSFWorkbook(file)
XSSFSheet sheet1 = workbook1.getSheetAt(0)
Iterator ite = sheet1.rowIterator();
But always getting the error like
- Thu Jan 31 15:03:13 IST 2019:ERROR:An error occurred [org/openxmlformats/schemas/spreadsheetml/x2006/main/CTExtensionList], see error log for details
Is there any other easy method of reading from an excel. Pplease help.
Please use ooxml-schemas-1.3.jar and try again.
Don't forget to accept as solution and give kudos.