pyuno

OpenOffice.org development with pyUno for Windows—which Python?

At home, on Linux, I've experimented with pyUNO to control OpenOffice.org using Python. I've been using Python 2.6. It all seems to work nicely. Now I thought I would try one of my scripts (run a graphical diff for ODF doc) on Windows. But when I tried to run it, I got: ImportError: No module named uno According to udk: Python UNO Br...

Openoffice3.1 pyuno confusing errors

I'm trying to get the sample and other sample codes i find for pyuno running with openoffice 3.1.1 and python 2.5 with no luck. Unfortunately, pyuno does not give any clues about what goes wrong. In [1]: import uno In [2]: local = uno.getComponentContext() In [3]: resolver = local.ServiceManager.createInstanceWithContext("com.sun.st...

Updating MS Word (or Open Office) bookmarks with Python

I'd like to fill MSWord bookmarks from a python script. I can't find such functions in win32com(MSWord) or in PyUno(OpenOffice). Does anyone know how to use bookmarks from Python? ...

Loading a document on OpenOffice using an external Python program

I'm trying to create a python program (using pyUNO ) to make some changes on a OpenOffice calc sheet. I've launched previously OpenOffice on "accept" mode to be able to connect from an external program. Apparently, should be as easy as: import uno # get the uno component context from the PyUNO runtime localContext = uno.getComponentCon...

Opening multiple documents in a same window with UNO

I have script in python using pyuno that extracts data from many excel files. My problem is that for every file I open and close a window with url = unohelper.systemPathToFileUrl(os.path.abspath(file_name)) file = desktop.loadComponentFromURL(url, "_blank", 0, () ) and file.close(True) Is there any way to extract data from the f...

Plural of words using Open Office API for Python (UNO)

I would like to retrieve the plural words in different languages in Python. I know that openoffice has an API called uno (import uno) and it should give me this ability using openoffice's language dictionaries, but I could not find any reference to it. As a concrete example, I would something like this: >>> print getPluralOf('table') ...