An interface similar to csv.DictReader for openpyxl WorkSheet objects
Project description
XLSX DictReader
This is a simple Python module that takes an openpyxl Worksheet object and returns a list of dictionaries. Each dictionary represents a row in the Excel file. The keys of the dictionary are the column names and the values are the cell values.
I've recently found myself, several times, wanting a thing like csv.DictReader for specific ranges of cells in Excel files. This does the job for me so far.
Sample Usage:
from openpyxl import load_workbook
from xlsx_dictreader import DictReader
wb = load_workbook('sample.xlsx', data_only=True)
ws = wb.active
reader = DictReader(ws, skip_blank=True)
for row in reader:
print(row)
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xlsx_dict_reader-0.4.0.tar.gz.
File metadata
- Download URL: xlsx_dict_reader-0.4.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.12 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08d8085f68cce42f899580a9345802e6c8879416130bdfda2af1baabef9e246b
|
|
| MD5 |
cb5e15e4554e1c04b116bbe0ec228418
|
|
| BLAKE2b-256 |
ac30c89cd023985da1425cf30776947274daea3ae15fe641034e097eafb89841
|
File details
Details for the file xlsx_dict_reader-0.4.0-py3-none-any.whl.
File metadata
- Download URL: xlsx_dict_reader-0.4.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.12 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36ae09ddebeda9a3ba7517b348a63bdf5dcd5a655a42a8247bfdf849bed31dc3
|
|
| MD5 |
0fae9e3a97e6515637caf79d45547830
|
|
| BLAKE2b-256 |
e80194eb01285b513591ceea415e853cd54605aeef34e2b1550d96fd2366b339
|