I use is_zipfileto check if this is a zip file before extracting it. But the method returns True in the excel file from the StringIO object. I am using Python 2.7. Does anyone know how to fix this? Can I use it is_zipfiile? Thanks.
is_zipfile
is_zipfiile
Quote from Microsoft xlsx Structure doc ,
Workbook data is contained in an email package that complies with the Open Packaging Agreement
, .xlsx zip . zip , if,
.xlsx
if os.path.splitext(filename)[1] != ".xlsx" and zipfile.is_file(filename):
, xlsx - zip .
xlsx
. :
Source: https://habr.com/ru/post/1530532/More articles:Ассемблер x86-64 для полиморфного вызова - c++Angular Предупреждение UT Bootstrap не закрывается - javascriptEntity Framework 6 One-to-Many Relationships Without Navigation Property - c #Bitwise operation inside angular ng-if - angularjsEnter the identifier field generated by the trigger but not passed - phpControlling sdk sidebar width for Firefox - firefoxWhy is the following standard considered unreadable code issued or impossible? - c ++Side Effects in Lisp / Clojure - lispUsing a GUID for a MySQL Membership Provider User - sqlDataDriven Unit Test с использованием Excel в VS2013 - 64bitAll Articles