If I have a spreadsheet with Sheet2:

    A
1 Item1
2 Item2
3 Item3

And Sheet1:

   A                              |      B            |     C
1 Same Page Lookup |                ▼|     X
2 Other Page Lookup  |                ▼|    Y
​3                                  |​                    |     Z

The B columns have data validations of lists. B1 references C1:C3, and B2
references Sheet2!A1:A3.

If I call getDataValidations on sheet1 (with prettyPrint), I get:

("B1 => list [$C$1:$C$3] ")

If I do the same with sheet2, I get:

()

Where's the other validation? I have noticed that if I name the range
"OtherPageRange", it'll then turn up on Sheet1's validations:

=> ("B1 => list [$C$1:$C$3] " "B2 => list [OtherPageRange] ")

But this isn't entirely satisfactory, if for nothing else than for the fact
that the validation must be =somewhere=!

​UPDATE: OK, I found it, but I'm going to send this email anyway in case
others have similar questions.

Some validations​ are stored in Excel's <main:dataValidations> section.
Others are stored in the <main:extLst> section in a subsection
<x14:dataValidations>. It appears you have to pull that out using
CTWorksheet.

And I suppose that also explains why it's not in POI: The newness (maybe?),
the extra work, and the fact that other validation aspects may rely on the
range-in-same-sheet-or-named logic.

===Blake===

-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
[email protected] <[email protected]>
www.PennyMacUSA.com <http://www.pennymacusa.com/>

Reply via email to