Closed BlackTarSalmon closed 4 years ago
Are you able to open the files in Excel or alternatively, with something like 7zip or WinRar? If that doesn't work, then your files are probably corrupted or not actually XLSB files.
They open in excel, definetly an xlsb file, correct relative path in code (directly copied from pycharm), tried switching to true path - same result
For good measure, can you try opening one of the unit test file in master: https://github.com/wwwiiilll/pyxlsb/raw/master/test_files/test.xlsb
If that worked, can you try re-saving your file with Excel as XLSB, it has a tendency to magically open "bad" files.
Damn it, resaving made it work... Sorry for taking your time, have a nice day
Did pretty much the same thing as in "Usage" but the same error pops up on every single file. I tried even random files that are not .xlsb and the exact same error appears pyxlsb==1.0.6
Traceback (most recent call last): File "...", line 50, in <module> main() File "...", line 45, in main with open_workbook(source_path) as wb: File "C:\Users\...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyxlsb\__init__.py", line 10, in open_workbook zf = ZipFile(name, 'r') File "C:\Users\...\AppData\Local\Programs\Python\Python36-32\lib\zipfile.py", line 1108, in __init__ self._RealGetContents() File "C:\Users\...\AppData\Local\Programs\Python\Python36-32\lib\zipfile.py", line 1175, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file