top | item 40678456

(no title)

varunnrao | 1 year ago

Python on LibreOffice appears to be more concerned with moving GUI elements and not enough with manipulating cells. There doesn't appear to be a straightforward library/module which helps me access specific cells and get their values. This would be a greater value proposition than allowing me to control Calc as a puppet using a Python script which seems to be their main idea.

discuss

order

buovjaga|1 year ago

Did you try the ScriptForge library shipped with LibreOffice: https://help.libreoffice.org/latest/en-US/text/sbasic/shared...

See the SFDocuments.Calc service there. ScriptForge makes it more convenient to work with the API.

Using it with Python: https://help.libreoffice.org/latest/en-US/text/sbasic/shared...

varunnrao|1 year ago

I hadn't come across the ScriptForge library before so I just looked it up. It looks pretty cool and definitely looks like how MSFT should have worked on including Python in Excel. From my quick look, it looks like ScriptForge is primarily a BASIC which supports Python(?). So I can only imagine how much more powerful a Python specific library could be given the differences in Python and BASIC themselves.