Hi all,
I am trying to read a very big excel file, so I have to user “user event
mode”.
But when reading some formula Record (for example, in cell B2, the formula
is ‘=A2’, A2 is a simple cell with text like ‘test’), the API works in
unexpected way.
My code is:
case FormulaRecord.sid:
FormulaRecord frec = (FormulaRecord) record;
thisRow = frec.getRow();
thisColumn = frec.getColumn();
if (outputFormulaValues) {
if (Double.isNaN(frec.getValue())) {
outputNextStringRecord = true;
nextRow = frec.getRow();
nextColumn = frec.getColumn();
} else {
thisStr = formatListener.formatNumberDateCell(frec);
}
} else {
thisStr = HSSFFormulaParser.toFormulaString(stubWorkbook,
frec.getParsedExpression());
}
break;
Please give me some advice, thanks!