OK, sorry, I didnt have the code in front of me... currently you have to do trial and error... and it doesnt throw an exception :(. If its a numeric formula, getStringValue will return "" and if it's a string formula, getNumberValue will return 0 !!
I thought it was user friendly to ensure that the poi client code will not throw null pointer exceptions, but maybe not .. the basic assumption i suppose was that one would know what kind of data a cell has, but again, maybe not! So maybe this could do with some refactoring! HTH - Avik On Mon, 2004-03-08 at 23:27, Karl-Heinz Zengerle wrote: > Hi Avik. > > For normal cells I've got the cell type. In case of formulas it's > CELL_TYPE_FORMULA (or something like that). So the result type is > hidden. > > I can do the trial & error method. Loading with one method for a > certain. If an exception occurs trying the next type, e.g. 1 numeric 2 > date 3 string. > > Regards, Karl-Heinz. > > > -----Urspr�ngliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 9. M�rz 2004 00:57 > An: POI Users List > Betreff: Re: AW: evaluating simple formula > > Same way you do for a normal cell.. sorry its midnight, and I dont have > the api > open in front of me... > > Quoting Karl-Heinz Zengerle <[EMAIL PROTECTED]>: > > > Thanks for the quick answer Avik. > > > > How do I know to which type the formula will result? > > > > Regards, Karl-Heinz. > > > > > > -----Urspr�ngliche Nachricht----- > > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Gesendet: Dienstag, 9. M�rz 2004 00:32 > > An: POI Users List > > Betreff: Re: evaluating simple formula > > > > Call getStringValue or getNumericValue on the cell. > > > > Quoting Karl-Heinz Zengerle <[EMAIL PROTECTED]>: > > > > > Hi world. > > > > > > I see methods to retrieve the formula but I'ld need the results. > What > > do > > > I have to do? > > > > > > Regards, > > > Karl-Heinz Zengerle > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
