Install package:
Make directory to store python script.
Edit my first python script:
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. The "Edit" button can't be clicked to use.
Code:
sudo apt install libreoffice-script-provider-python
Code:
mkdir -p .config/libreoffice/4/user/Scripts/python
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
I can only run it,can't edit it with this LibreOffice Calc window. The "Edit" button can't be clicked to use.
Statistics: Posted by luofeiyu — Fri Jan 31, 2025 3:53 am