dilshod / xlsx2csv

Convert xslx to csv, it is fast, and works for huge xlsx files
MIT License
1.68k stars 301 forks source link

zipfile.BadZipfile: File is not a zip file #25

Closed rtcoms closed 12 years ago

rtcoms commented 12 years ago

I tried to use the script but gave me the above error . find details below :

[xlsx2csv master] $ ./xlsx2csv.py /home/rtcoms/Desktop/bank_wise_csv_ifsc_codes/IFCB2009_02.xls /home/rtcoms/Desktop/code/personal_projects/ifcs_details/tmp/1.csv

Traceback (most recent call last): File "./xlsx2csv.py", line 443, in xlsx2csv(args[0], outfile, kwargs) File "./xlsx2csv.py", line 115, in xlsx2csv ziphandle = zipfile.ZipFile(infilepath) File "/usr/lib/python2.6/zipfile.py", line 696, in init** self._GetContents() File "/usr/lib/python2.6/zipfile.py", line 716, in _GetContents self._RealGetContents() File "/usr/lib/python2.6/zipfile.py", line 728, in _RealGetContents raise BadZipfile, "File is not a zip file" zipfile.BadZipfile: File is not a zip file

rtcoms commented 12 years ago

well , just noticed that my file is xls file not xlsx and that may be the reason. sorry for inconvenience.