[Solved] Calc Macro FreezeAtPosition is relative to location
Posted: Tue Oct 07, 2014 11:01 am
Hi,
I'm trying to write a very very basic Macro. I want it to Freeze the first line (to serve as headers).
When I used the dispatcher created automatically from the "record macro" - "dispatcher.executeDispatch(document, ".uno:FreezePanes", "", 0, Array())"
I got a popup asking if I want to set the first line as Headers.
in order to Avoid this popup I use:
"Doc.currentController.freezeAtPosition(0,1)".
My problem here is that it freezes the window relative to the active cell - i.e. If I'm standing on cell G16 when calling the Macro, it freezes the window at line 5, column F.
How can I make it work on the first line regardless of my current active cell? (I don't mind changing the active cell to A1, but for some reason no function I tried worked..)
Thanks a lot!
Miri
I'm trying to write a very very basic Macro. I want it to Freeze the first line (to serve as headers).
When I used the dispatcher created automatically from the "record macro" - "dispatcher.executeDispatch(document, ".uno:FreezePanes", "", 0, Array())"
I got a popup asking if I want to set the first line as Headers.
in order to Avoid this popup I use:
"Doc.currentController.freezeAtPosition(0,1)".
My problem here is that it freezes the window relative to the active cell - i.e. If I'm standing on cell G16 when calling the Macro, it freezes the window at line 5, column F.
How can I make it work on the first line regardless of my current active cell? (I don't mind changing the active cell to A1, but for some reason no function I tried worked..)
Thanks a lot!
Miri