Excel 2007-2010 Binary Workbook (xlsb) parser
Project description
pyxlsb is an Excel 2007-2010 Binary Workbook (xlsb) parser for Python. The library is currently extremely limited, but functional enough for basic data extraction.
Install
pip install pyxlsb
Usage
The module exposes an open_workbook(name) method (similar to Xlrd and OpenPyXl) for opening XLSB files. The Workbook object representing the file is returned.
import pyxlsb
wb = pyxlsb.open_workbook('workbook.xlsb')
The Workbook object exposes a get_sheet(idx) method for retrieving a Worksheet instance.
# Using the sheet index (1-based)
sheet = wb.get_sheet(1)
# Using the sheet name
sheet = wb.get_sheet('Sheet1')
Tip: A sheets property containing the sheet names is available on the Workbook instance.
The rows() method will hand out an iterator to read the worksheet rows.
for row in sheet.rows():
print(row)
Do note that dates will appear as floats. You must use the convert_date(date) method from the pyxlsb module to turn them into datetime instances.
print(pyxlsb.convert_date(41235.45578))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyxlsb-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9d119c62e0e2df5376c6bce8409a2e09acb6b804855e1f4d80de10a21e71b35 |
|
MD5 | 3b00e12ad183892397a64c44a47460b0 |
|
BLAKE2b-256 | 18137af2714a7bf29165522496f31d3972bbc999abf694cc3acbe424d8ad3d95 |