### Install pyxlsb Source: https://pypi.org/project/pyxlsb Use pip to install the pyxlsb library. This is the primary method for setting up the library for use. ```bash pip install pyxlsb ``` -------------------------------- ### Get a Worksheet by Index or Name Source: https://pypi.org/project/pyxlsb Retrieve a specific worksheet from the opened workbook using its 1-based index or its name. Both methods return a Worksheet instance. ```python # Using the sheet index (1-based) with wb.get_sheet(1) as sheet: # Do stuff with sheet # Using the sheet name with wb.get_sheet('Sheet1') as sheet: # Do stuff with sheet ``` -------------------------------- ### Open an XLSB Workbook Source: https://pypi.org/project/pyxlsb Import the open_workbook function and use it to open an .xlsb file. The function returns a Workbook object for further processing. ```python from pyxlsb import open_workbook with open_workbook('Book1.xlsb') as wb: # Do stuff with wb ``` -------------------------------- ### Convert XLSB Dates to Datetime Objects Source: https://pypi.org/project/pyxlsb Dates in XLSB files are represented as floats. Use the convert_date function from pyxlsb to convert these float values into Python datetime objects. ```python from pyxlsb import convert_date print(convert_date(41235.45578)) # datetime.datetime(2012, 11, 22, 10, 56, 19) ``` -------------------------------- ### Iterate Through Worksheet Rows Source: https://pypi.org/project/pyxlsb Read rows from a worksheet using the .rows() method. Use .rows(sparse=True) to skip empty rows. Each row is returned as a list of Cell objects. ```python # You can use .rows(sparse=True) to skip empty rows for row in sheet.rows(): print(row) # [Cell(r=0, c=0, v='TEXT'), Cell(r=0, c=1, v=42.1337)] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.