Python parsing XLS with images

匆匆过客 提交于 2019-12-24 07:25:28

问题


Have a problem with extracting images from xls files. There a lot of variants to parse xls using python (some libraries I have found there http://python-excel.org - xlrd, xlwt). But have hot found any information about extracting images from xls files without exporting to the other format.

For example, if i parse document with xlrd, it defines a cell with image as an empy str.


回答1:


There are some questions about this on the python-excel mailing list. See for instance here and here. The answer seems to be that you cannot use xlrd to get images from the XLS. The folks on that mailing list suggest using pywin32's COM features to remotely control Excel. This is basically going to be like writing Excel macros/scripts via Python, and will probably be a pain, but I think that's the only option for this situation.



来源:https://stackoverflow.com/questions/13448508/python-parsing-xls-with-images

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!