[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-user
Subject:    countif expression not updating in Excel 2003
From:       "Serena Hartoog" <SHartoog () ecrio ! com>
Date:       2007-04-11 5:30:59
Message-ID: F25F2FC9AF4F5C4FBE7F551F071C54D70DCB16 () BE080 ! mail ! lan
[Download RAW message or body]


I have a small spread sheet that looks like this in psedo-cvs format:
  ,abc
  ,abc
  ,abc
  ,abc
=countif(A1:A4,"Pass"),=A5

The formulas in the last row are, of course, not valid CVS.

If I create this spread sheet in Excel 2000 and run the code below,
it works find.

	String fileName = "input2000.xls";
	String outName = "output.xls";
	String sheetName = "Sheet1";
	int rowNum = 1;
	short colNum = 0;
	String result = "Pass";
	POIFSFileSystem fs =
		new POIFSFileSystem(new FileInputStream(fileName));
	HSSFWorkbook wb = new HSSFWorkbook(fs);
	HSSFSheet sheet = wb.getSheet(sheetName);
	HSSFRow row = sheet.getRow(rowNum);
	HSSFCell cell = row.getCell(colNum);
	HSSFRichTextString val = new HSSFRichTextString(result);
	cell.setCellValue(val);
	FileOutputStream out = new FileOutputStream(outName);
	wb.write(out);
	out.close();

But if I create this spread sheet in Excel 2003 and run the above
code, then the formulas are not updated in the output.xls file when
I open it. There is no error indication, but the counts show zero.
If I select each formula and hit return, then it will recompute 
the correct value.

I am using poi-3.0-alpha3-20061212.jar file.

Is anyone aware of this problem? Does anyone know a work around.

Serena

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic