apache - basic use of constructor XSSFWorkbook() -
i want enable class access , information excel workbook using apache poi. using:
xssfworkbook mybook = new xssfworkbook("filepath");
but throws "unhandled exception type ioexception".
i sure it's obvious, don't understand why isn't working. constructor should xssfworkbook() according apachepoi documentation. know missing fundamental.
if reading xlsx
file.
try { workbook workbook = new xssfworkbook(opcpackage.open(path)); worksheet worksheet = workbook.getsheet("sheet1"); //rest of logic } catch (exception ex) { ex.printstacktrace(); }
make sure file on filepath exist.
Comments
Post a Comment