I'm not exactly sure where the flag is. I forget. To determine this do
the following:
create a sheet with the formula in Excel
create the exact same sheet in HSSF
do a
java org.apache.poi.hssf.dev.BiffViewer excelsheet.xls > output.foo
java org.apache.poi.hssf.dev.BiffViewer hssfsheet.xls > output.too
diff output.foo output.too > diffs
vi diffs
there should be a record with a fairly obvious flag. The [RECORDNAME]
should match a class in
org.apache.poi.hssf.records and the prototype for creating the record
should be in org.apache.poi.hssf.model.Sheet (probably)
make this default to true and submit a patch. You may also find a flag
to do with wether the formula record is "dirty"... It would be nice if
your able to submit a patch to toggle these flags via the usermodel.
Instructions for submitting patches are under the "get involved" link
off of jakarta.apache.org/poi
-Andy
PS - do well so my JP Morgan stock goes up ;-)
[EMAIL PROTECTED] wrote:
>I should have said that if I do a manual recalculation within Excel (
>tools | options | calculation | manual, F9) the cell is still not
>updated - I have to double click on it as described below.
>
>If that still seems like a symptom of the automatic recalculation flag not
>being set, do you know if there is any way I could set the automatic
>recalculation flag within POI myself?
>
>Thanks,
>
>Gary.
>
>
>
>
>
>
>
>
>
>[EMAIL PROTECTED] on 08/14/2002 12:56:48 PM
>
>Please respond to [EMAIL PROTECTED]
>
>To: [EMAIL PROTECTED]
>cc:
>Subject: Re: SUMIF() problem (AVIK)
>
>
>The current head of POI ( and I assume the last dev release) seems to
>not set the automatic recalculation flag. Pppplease log this in
>bugzilla with a small example and xls file, and maybe vote for it.
> (Click bug database from jakarta.apache.org/poi). Some committers scan
>the list of unresolved bugs. I'd like to start taking the top voted for
>one a month...
>
>Thanks,
>
>-Andy
>----
>www.superlinksoftware.com
>POI-based reporting solutions for business.
>
>[EMAIL PROTECTED] wrote:
>
>
>
>>Hi,
>>
>>I'm having some problems using the SUMIF() formula - if I generate a cell
>>using it and then open the workbook it in Excel 97 (or 2000)
>>the displayed cell value is #VALUE!. However, if I look at the contents of
>>the cell, the formula appears to be set correctly, and if I double-click
>>on the cell, or hit the function button followed by OK, the cell then
>>recalculates correctly.
>>
>>I'm using 1.7-dev and JDK 1.3.1 with Excel 97. Code fragment included
>>below.
>>
>>Any ideas?
>>
>>Thanks,
>>
>>Gary.
>>
>>
>>
>>
>> HSSFWorkbook wb = new HSSFWorkbook();
>> HSSFSheet sheet = wb.createSheet("new sheet");
>> HSSFRow row;
>> HSSFCell cell;
>>
>> row = sheet.createRow((short)0);
>> // cell A1 = 3000
>> cell = row.createCell((short)0);
>> cell.setCellValue(3000);
>> // cell B1 = 2
>> cell = row.createCell((short)1);
>> cell.setCellValue(2);
>>
>> row = sheet.createRow((short)1);
>> // cell A2 = 2000
>> cell = row.createCell((short)0);
>> cell.setCellValue(2000);
>> // cell B2 = 1
>> cell = row.createCell((short)1);
>> cell.setCellValue(1);
>>
>> row = sheet.createRow((short)2);
>> // cell D3 should calculate as 2
>> cell = row.createCell((short)3);
>> cell.setCellFormula(" SUMIF ( A1:A2, 3000, B1:B2) ");
>>
>>
>>
>>
>>This communication is for informational purposes only. It is not intended
>>
>>
>as
>
>
>>an offer or solicitation for the purchase or sale of any financial
>>
>>
>instrument
>
>
>>or as an official confirmation of any transaction. All market prices, data
>>and other information are not warranted as to completeness or accuracy and
>>are subject to change without notice. Any comments or statements made
>>
>>
>herein
>
>
>>do not necessarily reflect those of J.P. Morgan Chase & Co., its
>>subsidiaries and affiliates.
>>
>>
>>--
>>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>
>>
>>
>>
>>
>>
>
>
>
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>
>This communication is for informational purposes only. It is not intended as
>an offer or solicitation for the purchase or sale of any financial instrument
>or as an official confirmation of any transaction. All market prices, data
>and other information are not warranted as to completeness or accuracy and
>are subject to change without notice. Any comments or statements made herein
>do not necessarily reflect those of J.P. Morgan Chase & Co., its
>subsidiaries and affiliates.
>
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>