You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Ben Mckenzie <bm...@highlineFI.com> on 2011/08/18 13:35:23 UTC

using an add-in defined function in a sheet

Hi all, I am trying to do something in POI, and I am finding myself completely stumped on how to do it.

I want to have a user defined function set from a java program (using POI), which then will allow it to be calculated when the spreadsheet opens in Excel.  it would be impossible to calculate this function in POI.

However, when I use cell.setCellValue() and open the file, the cells are not able to calculate, and no matter what I try F9, Ctrl-F9, etc, the cells don't calculate.  The only thing that seems to get them to calculate is to either click on the cell, and hit enter, or do a replace for = with =.

When I use setCellFormula, I get an error saying that the function is not registered, which of course it is not, since it is a add-in defined function.

I also tried addin "setForceFormulaReclaculation(true)" to the spreadsheet, but that didn't seem to do anything.

Any ideas?

Thanks for your help in advance!