gpt4 book ai didi

python - unoconv 将 .xlsx 文件导出为 png 等图像

转载 作者:行者123 更新时间:2023-11-28 17:41:30 25 4
gpt4 key购买 nike

我已经在我的 ubuntu 14.04 64 位中成功安装了 unoconv

我想将 .xlsx 文件的第一页导出为 png 或 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 中的一个不幸错误。与此同时,我似乎找到了解决方法:

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

根据我在 Google 上的快速搜索可以看出,这似乎是 LibreOffice 或 Python 版本的问题。如果我的解决方法对您不可行,则值得尝试使用各种版本。

关于python - unoconv 将 .xlsx 文件导出为 png 等图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23590960/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com