Bug 66682 - Boolean formula not handled in binary eventmodel
Summary: Boolean formula not handled in binary eventmodel
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-08 14:23 UTC by opeongo
Modified: 2023-08-01 08:30 UTC (History)
0 users



Attachments
Excel binary format spreadsheet containing boolean formula (8.34 KB, application/vnd.ms-excel.sheet.binary.macroEnabled.12)
2023-07-08 14:23 UTC, opeongo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description opeongo 2023-07-08 14:23:31 UTC
Created attachment 38598 [details]
Excel binary format spreadsheet containing boolean formula

When reading a binary excel file (xlsb) using the eventmodel cells that are of type BrtFmlaBool are not handled in the XSSFBSheetHandler.handleRecord method.  The consequence is that these cell will always yield an empty value regardless of the evaluation of the formula.

The easy fix is to add a cell handler for this record type.  Fortunately the existing handler for BrtCellBool does what is needed, so adding a single line with an additional case label does the job:

            case BrtCellBool:
            case BrtFmlaBool:
                handleBoolean(data);
                break;

Sample spreadsheet attached that contains cells showing this problem.
Comment 1 PJ Fanning 2023-07-08 16:16:27 UTC
linking to https://github.com/apache/poi/pull/485 so people are aware of the PR
Comment 2 Dominik Stadler 2023-08-01 08:30:36 UTC
This seems to have been applied via r1910951