如何在 Libreoffice 的计算中选择当前行?使用宏。
我想要达到的效果是:如果当前行是奇数行,将当前行背景色改为蓝色。
If currentAddress.Row mod 2 = 1 Then
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$A$3:$H$3"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "BackgroundColor"
args2(0).Value = 17798
dispatcher.executeDispatch(document, ".uno:BackgroundColor", "", 0, args2())
End If
args1(0).Value = "$A$3:$H$3" ,
“$A$3:$H$3”。如何将其表示为带有变量的范围?谢谢!