My cell value in bushelsPerFootCell is INDEX(Bushels!P13:AF67, MATCH(" +
widthCell + ",Bushels!O13:O67,1), MATCH(" + lengthCell +
",Bushels!P12:AF12,1))

            HSSFFormulaEvaluator evaluator = new
HSSFFormulaEvaluator(sheet, workbook);
            CellReference cellReference = new
CellReference(bushelsPerFootCell);

            HSSFRow evalBushelsPerFootRow =
sheet.getRow(cellReference.getRow());
            evaluator.setCurrentRow(evalBushelsPerFootRow);
            HSSFCell evalBushelsPerFootCell =
evalBushelsPerFootRow.getCell(cellReference.getCol());
            HSSFFormulaEvaluator.CellValue cellValue =
evaluator.evaluate(evalBushelsPerFootCell);

The cellValue has a cell type of 5 - an error. What's wrong with what I
have?




                                                                       
             Nick Burch                                                
             <[EMAIL PROTECTED]                                         
             m>                                                         To
                                       POI Users List                  
             12/19/2007 09:38          <[email protected]>           
             AM                                                         cc
                                                                       
                                                                   Subject
             Please respond to         Re: Using VLOOKUP               
             "POI Users List"                                          
             <[EMAIL PROTECTED]                                         
                   org>                                                
                                                                       
                                                                       
                                                                       




On Tue, 18 Dec 2007, Lauren Riley wrote:
> If I go to the second cell's function in the textfield, and hit enter,
> then the correct value displays.  So I know I have the right formula,
> but it's like it can't compute the second cell because it doesn't yet
> have the value from the first cell lookup.  Is there a way to get around
> this?

You could try using the formula evaluator to pre-compute the cell types
and values:
   http://poi.apache.org/hssf/eval.html

Otherwise, if you know the type of the data that the cell will hold, you
could try forcing the setting of that yourself

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




__________________________________________
The information contained in this message may be privileged and
confidential and protected from disclosure. If you are not the intended
recipient of this message, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us immediately
by replying to the message, and please delete it from your computer.

Reply via email to