![]() |
[openCalc Macro] gotoCell
Hallo,
in einem OpenCalc Macro habe ich mir die aktuelle Position gemerkt:
Code:
An einer anderen Stelle möchte ich jetzt wieder an diese Stelle springen:
oCell = ThisComponent.getCurrentSelection
Code:
funktioniert nicht, weil oCell offensichtlich nicht als "String" interpretiert wird, der wohl als "Value" erwartet wird.
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "ToPoint" args4(0).Value = oCell dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args4()) Wie springe ich also an die oCell Position? |
Re: [openCalc Macro] gotoCell
Hallo,
hab jetzt eine Lösung zusammengebaut: Merke mir die CellAddress
Code:
und frickel mir dann die Adresse zusammen:
oCell = ThisComponent.getCurrentSelection.CellAddress
Code:
Vielleicht gibt es eine elegantere Möglichkeit, aber es funktioniert so.
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue args4(0).Name = "ToPoint" args4(0).Value = "$"+Trim(Chr$(Asc("A")+oCell.Column))+"$"+Trim(Str(oCell.Row+1)) |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:34 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz