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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b36b8036e2e0f98051d1529f211a85af8c89de01e7d77a57369ac235d537add |
|
MD5 | 2c70731c738f1a2d27f97c70e2d1b9da |
|
BLAKE2b-256 | 6e97476723a7c1207caa9bc14b085cda22872e00662a4fdd55956191df4640c7 |
Close
Hashes for openpyxl_dictreader-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308f305897367c1b89a2ceba7c32e01b8f0ec25b3a8be5dbf4ed1b6a17dd34eb |
|
MD5 | f1585658be26928d9176ac94fa043837 |
|
BLAKE2b-256 | 16f6b2ca687f339df9401cf372093fbbc9027ed250a726dedd88259412ee9bdd |