poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 马鸣杰 <victor...@sparkleconsulting.com>
Subject how to read the formula cell in "user event mode"?
Date Thu, 25 Aug 2011 07:31:31 GMT
Hi all,

I am trying to read a very big excel file, so I have to user “user event

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,




Please give me some advice, thanks!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message