Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

POI - how to force Excel to re-calculate

 
Greg Soulsby
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Within POI I am putting a formula into cells,

=INDEX(LINEST(J2:S2,V$1:AE$1^{1;2}),1,1)

But Excel it shows the result as #value. If I go into edit on the formula and hit enter, it recalcs and works fine. Forcing re-calc with an F9 or AltF9 or Ctl Alt F9 does nothing. Tried evaluator.evaluateFormulaCell(cell); within POI but that crashes, presumably LINEST and or array functions are not implemented.

So my solution has been to write an excel macro that loops through the rows and columns, pasting each cell onto itself, thus forcing recalc.

Is there a way of programatically from POI setting a cell so it is recalulated by Excel when it opens / hit f9?

Regards
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Greg and welcome to Javaranch!

What version of POI are you using?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic