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]>