问题
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