I am rewriting a Excel Macro in Calc. It is now 90% complete but I have not been able to find how to split the Window within the macro code.
I've done extensive searches but so far no luck.
My sheet is 26 columns in width and I want to split the sheet at column index 15 - basically the equivalent of Window Split from the menu.
If anybody could please help me out with the code snippet to accomplish this, it would be appreciated.
Calc Macro: Help on how to split the window
Calc Macro: Help on how to split the window
OOo 1.X on MS Windows Vista
Re: Calc Macro: Help on how to split the window
Try this
Socal,
You can get these codes by simply recording a macro while trying to split the window as desired.
Regards
Anser
Code: Select all
oBook.CurrentController.select( oSheet.GetCellByPosition( 15,1 ) )
oDispatcher.ExecuteDispatch(oBook.GetCurrentController().GetFrame(), ".uno:FreezePanes", "", 0, {})
You can get these codes by simply recording a macro while trying to split the window as desired.
Regards
Anser
OOo 3.0.X on Ms Windows XP
Re: Calc Macro: Help on how to split the window
I think the dispatcher call provided results in freezing the window pane. A split can be done with ".uno:SplitWindow" in place of the ".uno:FreezePanes" I have also found the method
Dim Doc as Object
Doc = ThisComponent
Doc.CurrentController.FreezeAtPosition(5,0)
for freezing at the position (column,row).
The only method I have found for splitting a window is Doc.CurrentController.SplitAtPosition(x,y) where x and y are expressed in pixels. The API reference lists this method as deprecated, but I can't find any other non-deprecated method.
Dim Doc as Object
Doc = ThisComponent
Doc.CurrentController.FreezeAtPosition(5,0)
for freezing at the position (column,row).
The only method I have found for splitting a window is Doc.CurrentController.SplitAtPosition(x,y) where x and y are expressed in pixels. The API reference lists this method as deprecated, but I can't find any other non-deprecated method.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.