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

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -