I need to insert an invisible sheet into a calc spreadsheet. But the properties that I have written are ignored by "InsertNewByName" command.
Is there any possibility to create a new calc sheet with properties, like an invisible sheet.
The reason why I need this is, there is a short noticeable period between the moment when basic creates a new sheet and the moment when it sets the sheet invisible. Is it possible to insert a sheet with properties?
Code: Select all
Function aNewSheet
Dim oSheets
oSheets = ThisComponent.Sheets
sCount = oSheets.GetCount
nsnumber = sCount + 1
nsname = "Sheet" & nsnumber
thenextsheetname = nsname
dim oProps(0) as New com.sun.star.beans.PropertyValue
oProps(0).Name = "Visible"'.IsVisible(False)
oProps(0).Value = False
oSheets.insertNewByName(thenextsheetname, sCount + 1, oProps)
End Function