Code: Select all
Sub ToggleSheetGrid
Dim document As Object, dispatcher As Object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:ToggleSheetGrid", "", 0, Array())
End Sub
An example of a non-uniform approach.
E.g. Why it affects all sheets:
>>> ThisComponent.CurrentController.ShowGrid = True
And this one only for the active sheet:
>>> ThisComponent.CurrentController.freezeAtPosition(0, 1)