Posted 17 January 2021, 4:15 pm EST
add to maven dependency
<dependency> <groupId>com.grapecity.documents</groupId> <artifactId>gcexcel</artifactId> <version>4.0.0</version> </dependency>
write code
String dataDir = new File(System.getProperty(“user.dir”)).toString() + File.separator;
workbook.open(dataDir + FILE_NAME + “.xls”);
and give exeption after call method open
Exception in thread “main” java.lang.IllegalArgumentException: java.lang.NullPointerException: entry
at com.grapecity.documents.excel.n.c.z.a(Unknown Source)
at com.grapecity.documents.excel.Workbook.a(Unknown Source)
at com.grapecity.documents.excel.Workbook.open(Unknown Source)
at com.grapecity.documents.excel.Workbook.open(Unknown Source)
Can your library support xls files?