FreeBSD pkg: editors/libreoffice RE: python functions callable from calc formulars
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 02 May 2026 22:48:15 UTC
Dear Office,
We have been looking to call python functions from libreoffice calc
formulars.
Our steps:
1. add extension apso.oxt. the extension installs, but with
error "Failed to register package for vnd.sun.star.expand" (Not sure
thin step is required, but the error is interesting)
2. in calc formular editor "=pytest()" - directly call python function
from .../Scripts/python/
3. as a BASIC call with the following BASIC functions
REM Pass arguments to python script and return returned values
Function pyFunc(funct, args)
script = "functions.py$" + funct
pyFunc =
ThisComponent.getScriptProvider().getScript("vnd.sun.star.script:"+script+"?language=Python&location=share").invoke(args,
array(), array())
End Function
Function pytest(paramarray p)
pytest = pyFunc("pytest", p)
End Function
errors are various forms of
BASIC runtime error.
An exception occurred
Type: com.sun.star.script.provider.ScriptFrameworkErrorException
Message: ProviderCache::createProviden() Error creating provider from
factory. loading component library <... program/libpythonloaderlo.so>
failed