Unoconv exports a .xlsx file to an image, for example png

I have successfully installed unoconv in my ubuntu 14.04 64 bit.

I want to export the first sheet of a .xlsx file to an image, such as png or jpg.

I tried

 unoconv -l & 9998 ## this is to start the python listener unoconv -f png abc.xlsx 

I get the following:

 unoconv: UnoException during export phase: Unable to store document to file:///var/virtual/abc.png (ErrCode 3088) Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"draw_png_Export" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x2695ef8{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvider}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }) 

What should I do?

+3
python image excel libreoffice
source share
3 answers

This seems to be a failed bug in Unoconv. In the meantime, I seem to have found a workaround:

 unoconv Test_Data.xlsx # converts to PDF by default unoconv -f png Test_Data.pdf # *then* converts to PNG 

From what I can tell from a quick Google search, this seems to be a problem with versions of LibreOffice or Python. If my workaround is not suitable for you, it's worth a try playing with versions.

+2
source share

I was a bit unlucky when using the Ubunutu 12.x server. It has a built-in libreoffice. I tried installing openoffice through the debian installer from an open office site. But he could not convert files of any type.

So, I deleted everything by running the following commands.

 sudo apt-get remove --purge libreoffice* libexttextcat-data* && sudo apt-get autoremove sudo apt-get purge openoffice*.* && sudo apt-get autoremove sudo apt-get remove --purge unoconv 

Then add the libreoffice repository

 sudo add-apt-repository ppa:libreoffice/libreoffice-4-2 sudo apt-get update sudo apt-get dist-upgrade 

Then install libreoffice and unoconv (the apt-get version fails, so I used git clone)

 sudo apt-get install libreoffice git clone https://github.com/dagwieers/unoconv cd unoconv && sudo make install 

These steps solve my problems, but I still cannot convert docx or xlsx to image :(. Where does xlsx to pdf work for an image.

+1
source share

Yes. Converting xlsx to html causes this error. But xlsx to pdf is not

0
source share

All Articles