Thanks. Actually it's the reverse I want. I have an Excel spreadsheet that contains a formula returning a String. I've a tool written in Java that imports the data into a database. My question is simple: how hard is it to implement the retrieval of the calculated String in Java. Is the calculated String stored (like the calculated double) when the Excel file is saved?
Thanks, WILL ----- Original Message ----- From: "Michael Zalewski" <[EMAIL PROTECTED]> To: "POI Users List" <[EMAIL PROTECTED]> Sent: Friday, October 24, 2003 9:53 PM Subject: RE: retrieving saved String value of formula > POI HSSF does not interpret your formula. There is no 'mini-interpreter'. If > you see a value returned from .getValue(), it is because Excel computed it > before the template was saved. > > However, when you set a formula in a cell, your client should recomputed the > formula (after it receives the xls generated by POI). This is because HSSF > sets an internal flag on each worksheet that tells Excel to recomputed all > formulas when the spreadsheet is opened. > > So it shouldn't be hard to implement the feature you need. Just put the > formula in, and forget about the actual cell value. > > Michael Zalewski > > -----Original Message----- > From: Will Glass-Husain [mailto:[EMAIL PROTECTED] > Sent: Friday, October 24, 2003 8:52 PM > To: POI Users List > Subject: retrieving saved String value of formula > > Hi, > > I've been playing with the Formula support in the latest POI. I can't quite > tell from the "Formula Support" docs. When I retrieve a value with > FormulaRecord.getValue(), is this calculated by POI with a mini-interpreter, > or was the saved value part of the XLS file. > > Part of the reason that I ask is that my import tool needs to import some > calculated cells that return Strings. (I'm already successfully doing this > with calculated doubles). I'm wondering if the saved String values are > actually in the XLS file and how hard it would be to add support for this. > Any pointers? > > Thanks, > > WILL > > _______________________________________ > Forio Business Simulations > Will Glass-Husain > > > --------------------------------------------------------------------- > 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]
