On 3/6/2025 11:45 AM, Sebastian Henschel wrote:

Using the UNO bridge via Python seems to work, but loading the Excel file takes about 25s which is unacceptable to be run on each web request.

My first though, would be o load the Excel file once, via LibreOffice, when 
your Django server starts up.
And then have each web-request-call talk to that shared instance of LibreOffice 
via the Python UNO API.

Then it would also be able to modify the contents of the Excel file.


The hope is that SCFunctionAccess::callFunction (from 
core/sc/source/ui/unoobj/funcuno.cxx) can do that for me.
To be able to use that from Python, i could wrap it using boost::python or swig. Does anyone have experience with wrapping LibreOffice functions?

That would be pretty difficult, all of the LibreOffice code assumes that you 
loaded a document via the normal load process.
Calling them without having first established that context is going to be rough.

Reply via email to