I have a multi-sheet excel file saved in a .xlsb format that I wish to covert to .xlsx to utilize the openpyxl library - code already written to support the same workbook that used to be .xlsx until macro-enabled, and wouldn't save in .xlsm.
I have managed to convert from .xlsb to .csv, but cannot convert any further and have hit roadblocks with various libraries due to various formatting errors.
As my file has multiple sheets (all tables) I only need to copy and paste the text on every sheet (keeping the sheet names) and get it to a .xlsx format.
For simplicity sake, imagine all I need to do is: get sheet names, access a sheet, determine max row/column, loop: copy and paste cell values, write to .xlsx with sheet name. With the starting file being .xlsb.
Any suggestion would be much appreciated.
I got copy code to test run,but that return error,above error .
ValueError                                Traceback (most recent call last)
 in ()
----> 1 df = pd.read_excel(r'C:\Users\l84193928\Desktop\test.xlsb', engine='pyxlsb')
D:\Users\l84193928\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\util_decorators.py in wrapper(*args, **kwargs)
176                 else:
177                     kwargs[new_arg_name] = new_arg_value
--> 178             return func(*args, **kwargs)
179         return wrapper
180     return _deprecate_kwarg
D:\Users\l84193928\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\util_decorators.py in wrapper(*args, **kwargs)
176                 else:
177                     kwargs[new_arg_name] = new_arg_value
--> 178             return func(*args, **kwargs)
179         return wrapper
180     return _deprecate_kwarg
D:\Users\l84193928\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\io\excel.py in read_excel(io, sheet_name, header, names, index_col, usecols, squeeze, dtype, engine, converters, true_values, false_values, skiprows, nrows, na_values, parse_dates, date_parser, thousands, comment, skipfooter, convert_float, **kwds)
305
306     if not isinstance(io, ExcelFile):
--> 307         io = ExcelFile(io, engine=engine)
308
309     return io.parse(
D:\Users\l84193928\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\io\excel.py in init(self, io, **kwds)
367
368         if engine is not None and engine != 'xlrd':
--> 369             raise ValueError("Unknown engine: {engine}".format(engine=engine))
370
371         # If io is a url, want to keep the data as bytes so can't pass
ValueError: Unknown engine: pyxlsb
Convert .xlsb to .xlsx - Multi-sheet Microsoft Excel File