Hi,

I am writing a small application in OpenOffice calc using Basic programming.
There is a need to construct a list of valid strings based on current
settings in one cell and enable data validation of another cell using this
list of strings.

I am facing two level difficulties

1.) I can't completely figure out what APIs would be used for this purpose.
I have reffered to XPropertySet, XSheetCondition, TableValidation, SheetCell
for this purose.

2.) I can find some documentation on how to specify a numeric condition but
I am failing to find help on how to specify list of valid strings.

3.) I can't get this code to work

oCell.Validation.setPropertyValue("Type",
com.sun.star.sheet.ValidationType.DECIMAL)
oCell.Validation.setPropertyValue("IgnoreBlankCells",1)
oCell.Validation.setPropertyValue("InputTitle","Width Distribution")
xPropertySetInfo = oCell.Validation.getPropertySetInfo()
MsgBox oCell.Validation.getPropertyValue("Type")

The last syntax always returns 0, whether I use DECIMAL or LIST. Infact I
printed the value of DECIMAL constant and found out it is "2".

Please help me figure out what am I doing wrong and what all am I missing ?

-- 
Regards
Madhur Kashyap

Reply via email to