sheet.getDataValidations() returns an empty list when a cell is validated by a sequence on another sheet

Bill Fu <[email protected]>
Newsgroups gmane.comp.jakarta.poi.user
Message-ID <CAGikSkxuvVChET0P8XSZ2HMWr+1qy=-SO7szSRrvXfrT_9hR_Q@mail.gmail.com>
Hi, POI team.


I have a question for you. Please help me to take a look at it.

There is a workbook with two sheets:

   1. Sheet1
   2. Sheet2

And there is a sequence on Sheet2 at the range of A1 to A5:

   - aa
   - bb
   - cc
   - dd
   - ee

And in Sheet1, the cell A1 is validated by the sequence in Sheet2.

Excel screenshot <https://i.stack.imgur.com/qxc9S.png>

However, sheet.getDataValidations() returns an empty list for this case.
Did I miss something?

    public static void main(String[] args) throws Exception {
        String filePath = "/Users/fujiexiang/ExcelWorkbook.xlsx";

        Workbook workbook = WorkbookFactory.create(new
FileInputStream(filePath));
        Sheet sheet = workbook.getSheetAt(0);
        System.out.println("" + dataValidations + " " + dataValidations.size());
    }

"[] 0" was printed out.


Warmly regards

Bill Fu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.