Possible DsExcel 9.0.x COUNTIFS evaluation bug with formula-based criteria

Posted by: yijia on 19 February 2026, 5:42 pm EST

  • Posted 19 February 2026, 5:42 pm EST

    Reproduction Steps

    1. Open dsexcel_countifs_bug.xlsx in DsExcel

      Workbook wb = new Workbook();

      wb.open(“dsexcel_countifs_bug.xlsx”, OpenFileFormat.Xlsx);

      wb.calculate();

    IWorksheet ws = wb.getWorksheets().get(“Customer Cube”);

    System.out.println("C10 = " + ws.getRange(“C10”).getValue()); // → 2.0 (WRONG)

    System.out.println("C11 = " + ws.getRange(“C11”).getValue()); // → 2.0 (WRONG)

    DsExcel result: C10 through C24 all return 2.0

    1. Open the same file in Microsoft Excel

      Press Ctrl+Shift+F9 to recalculate.

    Excel result: C10 = 1, C11 through C24 = 0

    Expected

    DsExcel should match Excel: C10 = 1, C11-C24 = 0.

    File Structure

    Everything is on the Customer Cube sheet:

    Rows Content Description

    1 Date headers in B1:P1 Serial date numbers (44227, 44257, 44287…)

    2-3 Raw customer data 2 customers, 15 months of ARR values. Customer_0 starts month 0 (all cols > 0). Customer_1 starts month 1 (col B = 0, cols C+ > 0).

    5-7 Formula-based cohort dates =IFERROR(INDEX(…, MATCH(…)), “Never Active”) — finds first month with ARR > 0 for each customer. B6 = 44227, B7 = 44257.

    9-24 COUNTIFS block B column = EOMONTH date chain. C-Q columns = COUNTIFS formulas.

    Why C10 Should Be 1 and C11 Should Be 0

    The COUNTIFS formula in C10 is:

    =COUNTIFS(C$2:C$3, “>0”, $B$6:$B$7, $B10)

    criteria_range1 = C2:C3 (monthly ARR for both customers)

    criteria1 = “>0”

    criteria_range2 = B6:B7 (formula-based cohort dates: 44227 and 44257)

    criteria2 = B10 (EOMONTH date chain)

    C10 (B10 = 44227):

    Customer_0: C2 > 0 ✓ AND B6=44227 = B10=44227 ✓ → match

    Customer_1: C3 > 0 ✓ AND B7=44257 = B10=44227 ✗ → no match

    Result: 1 (Excel correct, DsExcel returns 2)

    C11 (B11 = 44255 via EOMONTH):

    Customer_0: B6=44227 ≠ 44255 → no match

    Customer_1: B7=44257 ≠ 44255 → no match

    Result: 0 (Excel correct, DsExcel returns 2)

    DsExcel ignores the criteria2 date comparison entirely and returns 2 (total count of rows where C > 0) for every row.

  • Posted 19 February 2026, 5:43 pm EST

  • Posted 20 February 2026, 12:48 am EST

    Hi Jay,

    Apologies for the inconvenience caused.

    We can replicate the behavior you mentioned on our end. We have escalated this matter with our development team and will update you as soon as we get any further information from their end.

    Internal Tracking ID: DSX-13935

    Kind Regards,

    Chirag

  • Posted 16 March 2026, 2:18 pm EST

    Was this fixed in the new version?

  • Posted 16 March 2026, 11:23 pm EST

    Hi Jay,

    You are correct that the mentioned issue has been fixed in the latest version, 9.0.3. The build for this version can be downloaded from the DsExcel Java CDN builds.

    Please let us know if you encounter any further issues or require additional assistance.

    Kind Regards,

    Chirag

    References:

    1. DsExcel Java CDN Build: https://cdn.mescius.com/DsDocs/DsExcel/9.0/dsexcel-java-9.0.3.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels