'Zipfile namelist() missing members from archive
I'm currently trying to open an .xlsx file with zipfile on Python, finding all files with namelist()
, then using .count()
to find all images in .png format within the archive.
My problem is currently, the list returned by namelist()
function returns only 1680 elements.
After saving the xlsx file as an html, I am able to view all images contained in the excel spreadsheet and the total file count is 3,352 files.
I checked documentation for zipfile and exhausted the best Google searches I could muster. I appreciate any hints or advice!
Here's the snippet of code I'm using:
import zipfile as zf
xlsx = 'myfile.xlsx'
xlsx_file = zf.ZipFile(xlsx)
fileList = xlsx_file.namelist()
Solution 1:[1]
maybe convert it to a wheel file? wheel works good to me
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Matthijs990 |