Bug 63999 - Data validations that references another sheet don't appear correctly
Summary: Data validations that references another sheet don't appear correctly
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 4.1.1-FINAL
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2019-12-11 22:46 UTC by jbjoerk
Modified: 2019-12-11 22:46 UTC (History)
0 users

Small sample workbook showing the error (9.69 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-12-11 22:46 UTC, jbjoerk

Note You need to log in before you can comment on or make changes to this bug.
Description jbjoerk 2019-12-11 22:46:02 UTC
Created attachment 36915 [details]
Small sample workbook showing the error


This is my first bug filed with Apache POI so apologies in advance if I fail to follow any standard procedure.

When loading a workbook that contains a data validation with a direct reference to another sheet, the validation does not appear in POI. (Direct, being it's specified directly in the validation, versus using a defined name for the data range, which works fine)

Pseudo code:
    wb = WorkbookFactory.create(new FileInputStream(new File("test.xlsx")))
    sheet =  wb.getSheetAt(wb.getActiveSheetIndex)
    validations = sheet.getDataValidations()

In the sample document (attached) there are three validations for cells A1,A2 and A3
A1 references another sheet using a defined name.
A2 references another sheet directly
A3 references a range in the same sheet.

When loading the workbook in POI 4.1.1, The A1 and A3 validations show up, but no sign of A2.