[Solved] Documentation for ScTableSheetObj

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Ove
Posts: 10
Joined: Sun Oct 27, 2019 6:46 pm

[Solved] Documentation for ScTableSheetObj

Post by Ove »

Honorable members

I'm new to the OpenOffice Macro interface, and i'm having a hard time finding any valuable documentation, except for your examples (thank you). For example
ThisComponent.getcurrentcontroller.activesheet
returns an object of type ScTableSheetObj, but where is that documented? What methodes are available from the activesheet object?
Currently i need to check if the sheet has a valid selection or not. If no cells are selected,
oCurSelection = thisComponent.CurrentSelection()
works fine, but
firstRow = oCurSelection.getByIndex(0).StartRow
crashes the macro with:
"BASIC runtime error. Property or method not found: getByIndex",
If I select some cells the macro runs fine fine.
Last edited by Hagar Delest on Mon Oct 28, 2019 9:47 pm, edited 1 time in total.
Reason: tagged solved
OpenOffice 4.1.7 on Windows 7
FJCC
Moderator
Posts: 9274
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Documentation for ScTableSheetObj

Post by FJCC »

The best way to see the properties and methods of an object is to use an object inspection tool. Here is a tutorial for the MRI tool.. There is also a tool called Xray that is very similar.
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.
JeJe
Volunteer
Posts: 2779
Joined: Wed Mar 09, 2016 2:40 pm

Re: Documentation for ScTableSheetObj

Post by JeJe »

The OpenOffice Api documentation:

https://www.openoffice.org/api/docs/com ... tView.html

A search for the thing you want information about in the search box here, or a search engine (just adding the word Openoffice to the search) will nearly always yield a previous thread on the subject, with solutions.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Ove
Posts: 10
Joined: Sun Oct 27, 2019 6:46 pm

[Solved] Re: Documentation for ScTableSheetObj

Post by Ove »

Thank's for your help.
FJCC: That was exactly what I was looking for.posting.php?mode=reply&f=20&t=99801#
OpenOffice 4.1.7 on Windows 7
Post Reply