XLSB Format
Read Excel Binary Workbooks (.xlsb) as flat row dictionaries (header from the first row). XLSB is read-only in this release.
Overview
| Property | Value |
|---|---|
| Format id | xlsb |
| Class | XLSBIterable |
| Extensions | .xlsb |
| Read | Yes |
| Write | No |
| Extra | xlsb (pyxlsb) |
| Maturity | stable |
File Extensions
.xlsb— Excel Binary Workbook
Implementation Details
Reading
- Uses
pyxlsb.open_workbook - Requires a filename (streams not supported)
- Header keys come from the first sheet row unless
keysis set - Cell values are stringified
list_tables()returns sheet names- Select sheet with zero-based
page; skip data rows after the header withstart_line
Writing
Writing is not supported. Attempting to write raises WriteNotSupportedError.
Key Features
- Multi-sheet: choose sheet by index via
page - Explicit headers: optional
keys - Row skip:
start_lineafter the header row
Usage
from iterable import open_iterable
with open_iterable("data.xlsb") as source:
for row in source:
print(row)
with open_iterable(
"data.xlsb",
iterableargs={"page": 1, "keys": ["name", "value"], "start_line": 0},
) as source:
for row in source:
print(row)
Record shape (keys from the first row or explicit keys):
{"name": "alpha", "value": "42"}
Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
page | int | 0 | No | Zero-based sheet index |
keys | list[str] | first row | No | Explicit column names (skips header extraction) |
start_line | int | 0 | No | Rows to skip after the header |
Error Handling
- ImportError: Missing
pyxlsb— install withpip install iterabledata[xlsb] - ValueError: Stream input (
XLSB requires a filename; stream is not supported) - WriteNotSupportedError: Writing XLSB is not implemented
- FileNotFoundError / pyxlsb errors: missing path, invalid sheet index, or corrupt workbook
See Troubleshooting for more help.
Installation
pip install 'iterabledata[xlsb]'
Limitations
- Read-only
- Filename required (no streams)
- Values are strings
- Requires pyxlsb
Related Formats
- XLSX — Office Open XML workbooks
- XLS — legacy Excel
- Supported formats