java - Formula evaluation in excel using Apache poi -


i trying read excel 2007 worksheet. problem in reading excel sheet cell has values in type of formula.

the values of cell like:

='c:\\**\[***.xlsx]*'!g23

when try read them using formula evaluation gives me below error:

exception in thread "main" java.lang.runtimeexception: not resolve external workbook name '/**/**.xlsx'. workbook environment has not been set up. @ org.apache.poi.ss.formula.operationevaluationcontext.createexternsheetrefevaluator(operationevaluationcontext.java:109) @ org.apache.poi.ss.formula.operationevaluationcontext.createexternsheetrefevaluator(operationevaluationcontext.java:84) @ org.apache.poi.ss.formula.operationevaluationcontext.getref3deval(operationevaluationcontext.java:309) @ org.apache.poi.ss.formula.workbookevaluator.getevalforptg(workbookevaluator.java:634) @ org.apache.poi.ss.formula.workbookevaluator.evaluateformula(workbookevaluator.java:505) @ org.apache.poi.ss.formula.workbookevaluator.evaluateany(workbookevaluator.java:263) @ org.apache.poi.ss.formula.workbookevaluator.evaluate(workbookevaluator.java:205) @ org.apache.poi.xssf.usermodel.xssfformulaevaluator.evaluateformulacellvalue(xssfformulaevaluator.java:267) @ org.apache.poi.xssf.usermodel.xssfformulaevaluator.evaluateformulacell(xssfformulaevaluator.java:154) @ org.apache.poi.hssf.usermodel.hssfformulaevaluator.evaluateallformulacells(hssfformulaevaluator.java:346) @ org.apache.poi.hssf.usermodel.hssfformulaevaluator.evaluateallformulacells(hssfformulaevaluator.java:337) @ org.apache.poi.xssf.usermodel.xssfformulaevaluator.evaluateallformulacells(xssfformulaevaluator.java:241) @ com.kiodex.excelworkbook2007.parse(excelworkbook2007.java:26) @ exceltest.main(exceltest.java:24)     caused by: org.apache.poi.ss.formula.collaboratingworkbooksenvironment$workbooknotfoundexception: not resolve external workbook name '/**/**.xlsx'. workbook environment has not been set up. @ org.apache.poi.ss.formula.collaboratingworkbooksenvironment.getworkbookevaluator(collaboratingworkbooksenvironment.java:194) @ org.apache.poi.ss.formula.workbookevaluator.getotherworkbookevaluator(workbookevaluator.java:156) @ org.apache.poi.ss.formula.operationevaluationcontext.createexternsheetrefevaluator(operationevaluationcontext.java:107) ... 13 more 

the sheet has proper values of formula type, when try evaluate it, gives error excel referenced in formula.

i tried doing possible ways given in below link. formula evaluation apache not work.

please help.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -