1

I'm starting to build an app (in java) and I am having some problems.I'm pretty new with all that and I'm getting a little lost.

I am trying to export some info to an excel template. I have no problem with that, but the template has some excel formulas.

When I open the template all the info is there, but in order to see the results of the formulas i have to copy/paste all the values given by the app.

I've found a sentence to update all the formulas

workbookInfDef.getCreationHelper().createFormulaEvaluator().evaluateAll();

But it doesn't work. An error stop happens with it and the app collapses...

I would be really greatfull if anyone could help me!

1 Answer 1

1

f you're using XSSF workbooks, you can re-evaluate all formula cells as follows:

XSSFFormulaEvaluator.evaluateAllFormulaCells(workbook)

A similar API exists if you're using an HSSF workbook:

HSSFFormulaEvaluator.evaluateAllFormulaCells(workbook)

Or, depending on exactly how you're set up and what specifically you're trying to get accomplished, you should be able to find your solution here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.