def Hello_there_2Python():
# get the doc from the scripting context which is made available to all scripts
desktop = XSCRIPTCONTEXT.getDesktop()
model = desktop.getCurrentComponent()
# access the active sheet
active_sheet = model.CurrentController.ActiveSheet
# write 'Hello World' in A1
cell = active_sheet.getCellRangeByName("A1")
cell.String = 'Hello World!'
Apologies I am totally new to Python. I use Ubuntu 22.04 as my OS. I have been using LO for many years but never tried running scripts or coding with it.
Py_not_showing_in_LO.pdf (77.6 KB)
Attached you can see that my script is in the file that contains all the Python scrips in LO. I have changed the permission in case that was the problem…but it still does not appear in the LO Calc Macro folder.
Please where am I going wrong?