https://issues.apache.org/bugzilla/show_bug.cgi?id=44677

           Summary: COUNTA function gives incorrect result
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: [EMAIL PROTECTED]


When I insert a COUNTA formula in a cell, the result is incorrect.
It seems it only returns the number of parameters.
When I open the excel file with excel (2003), if I edit the formula and just
press enter (force recompute, do not modify the formula), the result becomes
correct.
On the other hand, COUNT works fine.

Laurent


Example:

HSSFWorkbook wb=new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();
sheet.createRow(0).createCell((short)0).setCellValue(10);
sheet.createRow(1).createCell((short)0).setCellValue(20);
sheet.createRow(2).createCell((short)0).setCellValue(true);

// the result is 2, which is ok (only numbers are taken into account)
sheet.createRow(3).createCell((short)0).setCellFormula("count(A1:A3)");

// the result is 1, it should be 3
sheet.createRow(4).createCell((short)0).setCellFormula("counta(A1:A3)");


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to