Quantcast
Channel: Apache OpenOffice Community Forum
Viewing all articles
Browse latest Browse all 1281

Macros and UNO API • Why can't click the edit button to edit python script?

$
0
0
Install package:

Code:

sudo apt install libreoffice-script-provider-python
Make directory to store python script.

Code:

mkdir -p      .config/libreoffice/4/user/Scripts/python
Edit my first python script:

Code:

cd  .config/libreoffice/4/user/Scripts/pythonvim  hello.pyimport unodef HelloWorldPythonCalc():    oDoc = XSCRIPTCONTEXT.getDocument()    oSheet =oDoc.getSheets().getByIndex(0)    oCell = oSheet.getCellByPosition(0,0)    oCell.String = 'Hello World via Python'    return None
Now click buttons on the menu in LibreOffice Calc "Tools > Organize Macros > Python"

I can only run it,can't edit it with this LibreOffice Calc window.
edit.png
The "Edit" button can't be clicked to use.

Statistics: Posted by luofeiyu — Fri Jan 31, 2025 3:53 am



Viewing all articles
Browse latest Browse all 1281

Trending Articles