I am unable to program Openoffice documents from a python project.
Here is my Python code:
Second what does the “No module named 'uno” error mean?
Can anyone answer this and show what is needed to eliminate the errors and have Python talk to OpenOffice.
Here is my Python code:
filename = 'somefile.ods' import Danny.OOo.OOoLib as OOoLib import unohelper import os.path url = unohelper.systemPathToFileUrl( os.path.abspath(filename)) desktop = OOoLib.getDesktop() doc = desktop.loadComponentFromURL( url, "_blank", 0, () )The error I get is:
Error:File "c:\users\public\documents\python\openofficetest.py", line 3, in <module>
import Danny.OOo.OOoLib as OOoLib
File "c:\users\public\documents\python\Danny\OOo\OOoLib.py", line 38, in <module>
import uno
ModuleNotFoundError: No module named 'uno'
First I am not sure which folder to put the “Danny.OOo.OOoLib as OOoLib”Second what does the “No module named 'uno” error mean?
Can anyone answer this and show what is needed to eliminate the errors and have Python talk to OpenOffice.
buran write Apr-07-2023, 05:58 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.