I am trying to read a specific named range to a dataframe in python. My excel file is in xlsb format.
I have tried to look for it online and it seems like doing this on xlsx format is possible but haven't found anything for xlsb format.
I am trying to read a specific named range to a dataframe in python. My excel file is in xlsb format.
I have tried to look for it online and it seems like doing this on xlsx format is possible but haven't found anything for xlsb format.
You can use open_workbook
from pyxlsb
to process a xlsb file.
Here's a sample code to start with:
from pyxlsb import open_workbook
with open_workbook('sample_data.xlsb') as wb:
# Do stuff with wb
# Using the sheet index (1-based)
with wb.get_sheet(1) as sheet:
for row in sheet.rows():
print(row)
# Using the sheet name
with wb.get_sheet('Sheet1') as sheet:
# Do stuff with sheet
Reference: https://pypi.org/project/pyxlsb/