本文介绍了unoconv将.xlsx文件导出为像png一样的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在我的ubuntu 14.04 64位中成功安装了 unoconv
。
I have successfully installed unoconv
in my ubuntu 14.04 64 bit.
我想导出第一张表将.xlsx文件转换为png或jpg等图像。
I want to export the first sheet of an .xlsx file into image like png or jpg.
我试过
unoconv -l & 9998 ## this is to start the python listener
unoconv -f png abc.xlsx
我得到以下内容:
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 })
我该怎么办?
推荐答案
这似乎是Unoconv中一个不幸的错误。与此同时,我似乎找到了一个解决方法:
This seems to be an unfortunate 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
从我能从中得知快速谷歌搜索,这似乎是LibreOffice或Python版本的问题。如果我的解决方法对你来说不可行,那么尝试使用版本是值得的。
From what I can tell from a quick Google search, this seems to be an issue with either LibreOffice or Python versions. If my workaround isn't viable for you, it's worth a try playing around with versions.
这篇关于unoconv将.xlsx文件导出为像png一样的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!