Bug 66614 - The OFFSET function cannot handle cells after the 257th column
Summary: The OFFSET function cannot handle cells after the 257th column
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 5.2.3-FINAL
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-25 05:55 UTC by Takenori Kabeya
Modified: 2023-05-25 11:27 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Takenori Kabeya 2023-05-25 05:55:01 UTC
In /java/org/apache/poi/ss/formula/functions/Offset.java

There is a line:

private static final int LAST_VALID_COLUMN_INDEX = 0xFF;

So OFFSET doesn't work if the result column > 0xFF.
(Also the rows are restricted to 0xFFFF)
Comment 1 PJ Fanning 2023-05-25 10:40:50 UTC
I added r1910049 and will see if this builds ok - I ran some of the tests but will let the CI build do the full check.