Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JExcelApi - read a cell that contains a formula, but want to read the calculated value of the formul

 
Rudy Rodriguez
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using JExcel API, to read the contents of a existing excel file.

I am trying to read a cell that contains a formula, and displays the calculated value in that cell.

For example : 25 = (a1 * b1), where 25 is displayed in the cell.
Using JExcel API, i can read the formula in the cell, but how do i read the calculated value of the formula.



Thanks
 
Rob Spoor
Sheriff
Pie
Posts: 20555
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cell.getContents() and NumberCell.getValue() should both return the actual value. FormulaCell.getFormula() should return the formula itself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic