Python Macro Guides on TDF wiki

Hi,

I'm now writing a simple documents about writing macros with Python,
aiming to people who are new to LibreOffice macros.

I read the "My first Python Macro" examples from
https://wiki.documentfoundation.org/Macros/Python_Guide/My_first_macro

and have a simple question:

For Writer we getDocument() then getText() to get the text area in a
Writer document.  For Calc we getDocuments() then directly access
doc.Sheets[0]['A1'].

However in all the documents I have found in
https://api.libreoffice.org/  (like SpreadsheetDocument
<https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SpreadsheetDocument.html>)
and in https://help.libreoffice.org or wiki, I couldn't find any
descriptions or references about the attribute "Sheets" in a
SpreadDocument or XModel interfaces/service.

Is there any hint about this?  Or is it newly added?

Thanks, Franklin

I am pretty sure that enumerate these in my oome document. I cannot verify that right now, but take a look.

I have not used python to access LO so I cannot connect intelligently on python specific issues; sadly.

⁣Sent from BlueMail ​

Hi Franklin

I updated the wiki page with the API references you looked for:
https://wiki.documentfoundation.org/Macros/Python_Guide/My_first_macro

o (get)Text is an abstract interface supported in Writer docs
o getSheets is a Calc doc property

Both Basic and Python support the omission/addition of <get/set> accesser
prefixes