Ask Your Question

How do I activate a sheet in OO Basic

asked 2018-08-19 17:33:04 +0200

Orpheus2000 gravatar image

updated 2020-07-19 00:21:48 +0200

Alex Kemp gravatar image

What's the secret to activating a particular sheet, please?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-08-19 18:20:35 +0200

Ratslinger gravatar image

updated 2018-08-19 18:37:07 +0200

Hello Orpheus2000,

Going strictly on the question:

oSheet = ThisComponent.Sheets.getByName("Sheet_Name_To_Activate")

will activate a particular existing sheet.

If you just wish to access a sheet:

oSheet = ThisComponent.Sheets.getByName("Sheet_To_Access")



Once you have the sheet you can get at specific info:

oCell = oSheet.GetCellRangeByName("A1")

For much more info on macros in Calc, here is the PDF for Open Office Macros Explained by Andrew Pitonyak -> OOME

It is the best single source for LO/AOO macros.

edit flag offensive delete link more


Thanks for that, and I now have Andrew Pitonyak’s PDF, which looks to be exactly what I needed.

Orpheus2000 gravatar imageOrpheus2000 ( 2018-08-21 13:12:29 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-08-19 17:33:04 +0200

Seen: 2,647 times

Last updated: Aug 19 '18