Bug 64369

Summary: COUNTIF and <> with wildcard didn't work
Product: POI Reporter: Aljoscha Rittner <arittner>
Component: XSSFAssignee: POI Developers List <dev>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 4.1.2-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Test to show an Excel sheet with some COUNTIF calculations and the bug
Shows the created Excel file with the COUNTIF <>* bug

Description Aljoscha Rittner 2020-04-21 11:14:18 UTC
Created attachment 37187 [details]
Test to show an Excel sheet with some COUNTIF calculations and the bug

Hello!

The formula COUNTIF(range, "<>*") didn't work as expected. The formula returns all time 0. 

Other string matchings are working as expected.

This was observed in Apache POI 4.01 and is still not working in 4.1.2.

The attached test class creates a workbook and opens it with Excel (if it's installed). Please check column D (this is the calculated result from Excel) and column I. In column I is the calculated value from Apache POI (all zero). 

If you call "Refresh All" to refresh the conditional formatting (this is also not working for this sheet, but maybe a follow-up error) you can see the difference cells in yellow.


best regards,
Aljoscha.

PS.: COUNTIF(cell:cell, "<>*") is similar to IF(ISNONTEXT(cell),1,0) and is used by some Excel heros ;-)
Comment 1 Aljoscha Rittner 2020-04-21 11:20:09 UTC
Created attachment 37188 [details]
Shows the created Excel file with the COUNTIF <>* bug