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

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -