A simplified wrapper around `openpyxl` optimized for easy read and write operations.
Project description
Introduction
excelmanager
is a stripped-down wrapper around the openpyxl
package. It exposes two very simple functions (read_file_sheet
and write_file_sheet
) that provide quick and easy ways to perform read/write operations against Excel files. This package is ideal for applications where the goal is to be able to quickly and easily get simple tabular data in and out of various Excel files without worrying about things like advanced formatting or charting.
Installation
pip install excelmanager
Usage
The read_file_sheet
function allows data to be read back from a sheet in multiple formats.
# Outputs a list of ordered dictionaries
results = excelmanager.read_file_sheet(
"path/to/file.xlsx", "Sheet1", output_row_type="OrderedDict"
)
# Outputs a list of lists
results = excelmanager.read_file_sheet(
"path/to/file.xlsx", "Sheet1", output_row_type="list"
)
# Outputs a list of tuples
results = excelmanager.read_file_sheet(
"path/to/file.xlsx", "Sheet1", output_row_type="tuple"
)
# Reads data from a specific range
results = excelmanager.read_file_sheet(
"path/to/file.xlsx", "Sheet1", range=("B3", "E12")
)
The write_file_sheet
writes data to a specified Excel file and sheet. If the sheet or file don't yet exist, this function will create them.
# Write from sequence data with specified headers
excelmanager.write_file_sheet(
"output.xlsx",
"path/to/output",
(("Value1", "Value2", "Value3"), ("Value4", "Value5", "Value6")),
headers=("Column1", "Column2", "Column3"),
)
# Write using OrderedDict data. Keys are used as headers unless an empty sequence ([]) is passed.
excelmanager.write_file_sheet(
"output.xlsx",
"path/to/output.xlsx",
[
OrderedDict({"Column1": "Value1", "Column2": "Value2", "Column3": "Value3"}),
OrderedDict({"Column1": "Value4", "Column2": "Value5", "Column3": "Value6"}),
],
)
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
File details
Details for the file excelmanager-1.0.1.tar.gz
.
File metadata
- Download URL: excelmanager-1.0.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d00cd0ee65ba64f87899c0302c1ff7b08b8bc3e7e6d0fb4cd433a0d322ce772a |
|
MD5 | 8a32987054bd76a0383f215ec3486998 |
|
BLAKE2b-256 | 3b04e0aa07a4ce66db9868ab0da37d612d285f8b2ff02bb2f797d270734008cd |
Provenance
The following attestation bundles were made for excelmanager-1.0.1.tar.gz
:
Publisher:
release.yml
on ebier92/excelmanager
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
excelmanager-1.0.1.tar.gz
- Subject digest:
d00cd0ee65ba64f87899c0302c1ff7b08b8bc3e7e6d0fb4cd433a0d322ce772a
- Sigstore transparency entry: 146258804
- Sigstore integration time:
- Predicate type:
File details
Details for the file excelmanager-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: excelmanager-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1a396a52168505262722437ae7f914a1f0f384a55ecd5cefbb698e329f62442 |
|
MD5 | 891683aa946e9f8a70b2acad77371ed7 |
|
BLAKE2b-256 | 66e75945bf7b0078dcd0347ac1d5476278e84ebce4300a365cff2d73521044c5 |
Provenance
The following attestation bundles were made for excelmanager-1.0.1-py3-none-any.whl
:
Publisher:
release.yml
on ebier92/excelmanager
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
excelmanager-1.0.1-py3-none-any.whl
- Subject digest:
f1a396a52168505262722437ae7f914a1f0f384a55ecd5cefbb698e329f62442
- Sigstore transparency entry: 146258805
- Sigstore integration time:
- Predicate type: