Excel Data List Validation in Powershell
- by idazuwaika
Hi,
I have a range named "STATE".
I want to set data validation in range ("A1") to only take value within this range using Powershell.
Below is what I have tried. Does not work. I dont know what to put as 4th and 5th parameters. The first 3 are Excel constants equivalent to xlValidateList, xlValidAlertStop and xlBetween respectively.
$ws.Range("A1").Validation.Add(3, 1, 1, "=STATE", 0)
Please help.
Thanks.