There is a bug in the Apache POI AreaReference.getWholeRow(). It returns a reference like $A1:$IV1
. This is true for old Excel workbooks, but for the new format that POI supports as XSSFWorkbook
, the reference should be $A1:$XFD1
.
If you attempt to work around this by defining an explicit name for $A1:$XFD1
, Excel will quietly rewrite the reference to $1:$1
, triggering the bug once again in POI. A nasty work-around is to define a name as $A1:$XFC1
(note: XFC instead of XFD). Excel leaves this reference untouched and POI handles it correctly. Too bad it is an awfully inconvenient work-around.