A simple package to read openpyxl worksheets like a csv DictReader
Project description
openpyxl-dictreader
Description
A module that maps the information in each row in an openpyxl worksheet to a dict whose keys are given by the optional fieldnames parameter, similar to Python's native csv.DictReader.
Installing
pip install openpyxl-dictreader
Examples
Input:
import openpyxl_dictreader
reader = openpyxl_dictreader.DictReader("names.xlsx", "Sheet1")
for row in reader:
print(row["First Name"], row["Last Name"])
Output:
Boris Johnson
Donald Trump
Mark Rutte
load_workbook keyword arguments
The openpyxl load_workbook method takes several optional keyword arguments. These can be passed into the openpyxl_dictreader.DictReader constructor as keyword arguments:
reader = openpyxl_dictreader.DictReader("names.xlsx", "Sheet1", read_only=False, keep_vba=False, data_only=False, keep_links=True)
Acknowledgements
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
Close
Hashes for openpyxl-dictreader-0.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c99183ea25a227d5433192e5c048395675ec3151c22cf14e6f23241cf6a54e28 |
|
MD5 | f7c420308484f7c7d91f6d4343981f05 |
|
BLAKE2b-256 | ba7780aa420d2d4249a193c932b15311d1a303dc660a60d56e46153a067640d5 |
Close
Hashes for openpyxl_dictreader-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fe9bdd7fc631ba693672d1460214cb5fd24306ac6b5fc3a3848947f27b9c112 |
|
MD5 | 8cb3caee99d87b3e956d85145a4272ec |
|
BLAKE2b-256 | 88211ece1970fd5d574dea7078531d9c556ece48c876d0e8855f086b43172487 |