I am attempting to set the properties for all the rows and columns in a spreadsheet (using Basic). From reading the documentation, it would seem that the following should work, however, it does not:
Dim oDoc As Object, oSheet As Object, vValue As Variant
oDoc = ThisComponent
oSheet = oDoc.Sheets.getByName("mySheet")
vValue = False
oSheet.Rows.setPropertyValue("OptimalHeight", vValue)
oSheet.Columns.setPropertyValue("OptimalWidth", vValue)
print "height: " & oSheet.Rows.getPropertyValue("OptimalHeight") & _
" width: " & oSheet.Columns.getPropertyValue("OptimalWidth")
When I run the above, the value returned via the Print is always True. I have changed the vValue to String and Boolean, and have used the Boolean value directly as follows:
oSheet.Rows.setPropertyValue(“OptimalHeight”, False)
Any ideas why this fails? Does one have to write to the Sheet for the property to take affect???