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 456 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 like 456 (Number).
My Code
for(int i = 1; i < CS_BBH.getRows(); i++)
{
System.out.println(CS_BBH.getCell(13, i).getContents());
if(ExcelWriteHelper.isNumeric(CS_BBH.getCell(13, i).getContents()))
{
val = Double.parseDouble(CS_BBH.getCell(13, i).getContents());
if(val > 98)
{
ExcelWriteHelper.addCells(CS_BBH, 13, i, CS_BBH.getCell(13, i).getContents(), cellGreenFormat);
}
else
{
ExcelWriteHelper.addCells(CS_BBH, 13, i, CS_BBH.getCell(13, i).getContents(), cellYLFormat);
}
}
}
Can i use any another why in jxl library to implementing formula and after then get real displaying calculated value.
because i can't use poi library for this application.
Please give me any suggestion.