如何从xlsx中提取带有单元格信息的图像?

问题描述 投票:1回答:1

我有一个 xlsx 文件中包含了一列的每一行的图像和其他几个文件。我想提取这些图像与单元格的一些信息,如单元格ID或行号,所以我可以映射这些图像回到以后在表中给出的信息。

我将使用这些信息来做进一步的分析。

我试过这个方法。

import zipfile
XLSname = "/Users/user/myfile.xlsx"

EmbeddedFiles = zipfile.ZipFile(XLSname).namelist()
ImageFiles = [F for F in EmbeddedFiles if F.count('.jpg') or F.count('.jpeg') ]

for Image in ImageFiles:
    zipfile.ZipFile(XLSname).extract(Image)

如上所述: https:/stackoverflow.coma193060157570548中提到的。

但我用这种方法得到的图像没有任何信息,我可以用这些信息将它们映射回它们在文件中的行。

我希望一些单元格或行信息能与图像相关联。

javascript python excel xlsx exceljs
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.