Questions tagged [pyuno]

PyUno is the official Python interface to the OpenOffice component model, UNO.

52 questions
7
votes
3 answers

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…
Craig McQueen
  • 41,871
  • 30
  • 130
  • 181
6
votes
2 answers

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 #…
Khelben
  • 6,283
  • 6
  • 33
  • 46
5
votes
3 answers

Python 2.7 with pyuno

I am having python 2.7 installed on my windows 7. I have installed Libre Office 3.4 which comes with python 2.6. Hence i am not able to import uno and unohelper even after setting all environment variables. I need python 2.7 thus cannot revert back…
PyBegginer
  • 199
  • 1
  • 3
  • 11
5
votes
2 answers

OpenOffice pyuno "select all"

Does anyone know how to use the OO uno bridge api to "select all" in a Calc sheet? Alternatively, finding the maximum used row and column number would work. What I want to do is apply a format to all the cells in the spreadsheet. (The reason being…
c-urchin
  • 4,344
  • 6
  • 28
  • 30
4
votes
1 answer

Using pyuno on MacOS to do file conversions

I am running MacOS 10.6 and OpenOffice 3.3. I am interested in using PyUNO to script conversions of .odp to .ppt, .pdf, and .swf. I have not found any clear documentation on how to do so with MacOS. Does anyone know of existing documentation to…
seandavi
  • 2,818
  • 4
  • 25
  • 52
4
votes
1 answer

Getting thumbnails of arbitrary file types

I need to get the thumbnails from arbitrary file types. (Or as many as I can.) For image like file types I can use image-magick for it. For document like files I am thinking I would use: Document -> (Open office with Pyuno) PDF -> (Image-magick) Pdf…
shabda
  • 1,668
  • 1
  • 18
  • 28
4
votes
1 answer

running PyUNO in django

I've got a customer running a SUSE Enterprise Server 11, on which I want to use a django-project with the OpenOffice-Python-Bridge called PyUNO. It runs an apache2 with mod_wsgi and doesn't have a virtualenv or something. I added the relevant path…
Marius
  • 930
  • 1
  • 9
  • 28
3
votes
3 answers

Using pyuno with my existing python installation

I'm trying to use PyUNO as a method to convert different document formats (doc, wordperfect, html, etc) to PDF from within my Django server. I'm having a heck of a time getting import uno to work. It seems to fail when doing import pyuno, with a…
Chris Curvey
  • 9,738
  • 10
  • 48
  • 70
3
votes
1 answer

How to check paragraph adjustment using pyUNO library in Libre/Open Office?

The com.sun.star.style.ParagraphProperties service supports the property ParaAdjust, that supports 5 values from com.sun.star.style.ParagraphAdjust (ParagraphProperties, ParagraphAdjust). To set the value, one of the two methods could be…
LikosX
  • 81
  • 6
3
votes
2 answers

How can you extract the currently-selected range of cells in LibreOffice calc via pyuno?

When using pyuno in a LibreOffice / OpenOffice calc python macro, I would like simply to be able to select a range of cells, and when the macro is run, for all of the cell data (e.g. as some iterable object) to be able to be retrieved within the…
Mark
  • 3,357
  • 30
  • 31
3
votes
2 answers

Openoffice pipe (unix domain socket) somewhere other than /tmp?

It's possible to get Openoffice to accept UNO connections over a unix domain socket with: $soffice -headless -invisible -nocrashreport -nodefault -nologo -nofirststartwizard -norestore -conversionmode…
Marcin
  • 48,559
  • 18
  • 128
  • 201
3
votes
1 answer

How to debug crashing openoffice with pyuno

I'd like to use openoffice to programmatically convert docx to pdf. I know unoconv can do this, and indeed unoconv will do this for me, even if I run a separate listener (using unoconv -l) and invoke unoconv -n (so that it will die if it can't…
Marcin
  • 48,559
  • 18
  • 128
  • 201
2
votes
2 answers

How to change the LineWidth of a cell border using PyUNO in LibreOffice Calc?

I am writing a Python script to automatically adjust cell borders in LibreOffice Calc. I think I know what property I need to change, however when I assign a new value to this property, the value does not change. For instance, I wrote this code to…
Rafael
  • 133
  • 4
2
votes
1 answer

unotools - try to convert ods or excel files to csv using python

What I need is a command line tool to convert excel and ods spreadsheet files to csv which I can use on a web server (Ubuntu 16.04). I already red this: https://pypi.python.org/pypi/unotools which works fine for the given examples. And this:…
dlg_
  • 307
  • 4
  • 11
2
votes
1 answer

PyUno file types conversion for writer

All, I am modifying a python script (using PyUno) that will read in MSword document (.docx) and convert it to xml. I have a script that will do everything I need here, except it will convert from doc to pdf. I cannot find a list of acceptable…
NotCharlie
  • 43
  • 2
  • 9
1
2 3 4