Thank you so much Nick. That fixed my problem perfectly. I was simply not aware that the formulas need to be manually recalculated after the values are entered. I think this would have been great information to include in the HSSF documentation. The code for recalculating the formulas can be found here: http://poi.apache.org/hssf/eval.html . It should be noted that the scratchpad jar file needs to be added to the project. Why such a critical feature such as cell evaluation (one that has its own page per the link above) is not included in the main POI jar file I don't know. However, I'm grateful that it's at least in the scratchpad. Thanks again.
Faraz On Tue, Mar 11, 2008 at 8:30 AM, Nick Burch <[EMAIL PROTECTED]> wrote: > On Fri, 7 Mar 2008, Faraz Rozi wrote: > > Hi folks, I have been working on this problem for quite some time and > > haven't gotten anywhere with it. The situation is quite critical and > > urgent. I'm using Apache POI-HSSF usermodel. I have written a program > > which produces a JTable of certain data and then exports this into a > > pre-existing excel spreadsheet based on user interaction from the GUI. > > My spreadsheet has certain cells with pre-existing formulas which rely > > on the values of other cells that the program is writing to. > > Are you running a full formula evaluation once you're done with the > jtable? That'd be my suggestion. Simply changing the values in dependent > cells isn't enough, you'll still need to tell poi to go and re-calculate > the formula cells for you > > Nick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
