PyUno is the official Python interface to the OpenOffice component model, UNO.
Questions tagged [pyuno]
52 questions
2
votes
0 answers
Uwsgi through supervisor, runtimeException pyuno
Run django project using uwsgi + supervisor.
We use pyuno for generating documents with LibreOffice.
Uwsgi config:
[uwsgi]
virtualenv = /var/www/myuser/.Envs/j297/
vacuum = True
chdir = /var/www/myuser/j297/twotbank/
socket =…

WebPal
- 818
- 8
- 16
2
votes
3 answers
start openoffice process with python to use with pyuno using subprocess
I use this command to start openoffice:
soffice --accept="socket,host=localhost,port=8100;urp;StarOffice.Service" --headless --nofirststartwizard
The following command will ensure that openoffice is accepting connections on port 8100:
netstat -nap…

user1538560
- 429
- 1
- 6
- 16
2
votes
1 answer
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 =…

altunyurt
- 2,821
- 3
- 38
- 53
2
votes
2 answers
Does a PyUno Bridge object model exist?
I've managed to access LibreOffice.calc, open my file, select my sheet and getValue() and getFormula()... That is, my job is (nearly) done, but... the PyUno bridge is just a bridge and not very Pythonic.
For instance, for sheet in sheets: throws the…

GUI Junkie
- 539
- 1
- 17
- 31
2
votes
1 answer
Using PyUNO on Windows and CentOS
Is there any way to use OpenOffice's PyUNO without using the version of Python that comes with OpenOffice?
I mean, can I install a package (on Windows and CentOS) that uses the version of Python that's already on the server?
I'm trying to use…

Karim
- 18,347
- 13
- 61
- 70
1
vote
2 answers
How to save a document edited from PyUNO?
I have now succeeded in opening a Word 97-2003 (.doc) document and edited it from Python. But how do I save it?
I always get:
Traceback (most recent call last):
File "office.py", line 55, in
…

Prof. Falken
- 24,226
- 19
- 100
- 173
1
vote
1 answer
Connecting to LO from python IDE with PyUNO for debugging
I am trying to set up an comfortable environment to develop some python scripts for LibreOffice Calc.
Before I tried to edit .py files directly from "/home/user/.config/libreoffice/4/user/Scripts/python/". This would not let me debug the script,…

laksdjfg
- 15
- 3
1
vote
1 answer
How to set Text Background Color using PyUNO with OpenOffice
I have a python script that successfully does a search and replace in an OpenOffice Writer document using PyUNO. I am able to set the CharColor of the replaced text ok but am unable to set the BackColor (background color).
found.setPropertyValue(…

Ryan
- 614
- 4
- 11
1
vote
2 answers
Why does desktop.getCurrentComponent() return None in PyUNO?
Trying to revive a PyUNO sample script called Wavelet to learn how LO works nowadays and get re-started. Since LibreOffice & UNO changed a bit from the script's creation time I am running into problems.
Managed to get the desktop object. Now I want…

Cigydd
- 93
- 1
- 8
1
vote
1 answer
Recasting a STRING into a VALUE in LibreOffice Calc
I have a Python class that does some currency conversion and string formatting of numbers. It takes polymorphic input, but only spits out a stringified number. I can push those stringified numbers up to a LibreOffice Calc in Python easy enough:…

James Aanderson
- 320
- 2
- 10
1
vote
0 answers
pyuno missing symbol in libreoffice and not working with python2
I have installed Libreoffice version 6.0.4.2 from source code on Linux using gcc 4.9.1
When I try to import uno in python2 i get error message. dynamic module does not define init function (initpyuno)
Python 2.7.11 |Anaconda custom (64-bit)|…

Vatsal Bhatt
- 11
- 1
1
vote
3 answers
Pyuno on Python 3.6 installation issue
I am running Windows 7, Python 3.6 and LibreOffice 5.4.2.2 (installed in this order).
GOAL: install and use pyuno on Python 3.6 outside LibreOffice (standalone IDE, int his case: PyCharm 2017.2.3 Community Edition). I would like to be able to run…

Adam Es
- 21
- 1
- 3
1
vote
2 answers
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…

duduklein
- 10,014
- 11
- 44
- 55
1
vote
1 answer
Search strings and line breaks with pyUNO
I would like to delete a specific string from a document. I manage to delete the content of the string, but the line break still remains after. I found some things about ControlCharacters but it seems they are only numeric constants. Is it actually…

azmeuk
- 4,026
- 3
- 37
- 64
1
vote
1 answer
Sorting cell range in a calc document with pyuno
With pyuno I open a LibreOffice calc document, I define a range of cells and I want to sort it. Here is the code:
import os
import uno
# open a calc document
# (it is assumed that LibreOffice is launched with the command line:
# soffice…

Yves Lemaire
- 11
- 3