Python Wrapper for openpyxl
Project description
openpyxl
This module provides wrapper for openpyxl.
Installation
pip install takeme-openpyxl
Usage (Reader)
import takeme_openpyxl
INPUT_FILE_NAME = 'input.xlsx'
INPUT_COLUMNS = {
'column1': {
'label': 'Label 1',
'column': 'A'
},
'column2': {
'label': 'Label 2',
'column': 'B'
}
}
reader = takeme_openpyxl.ExcelReader(INPUT_FILE_NAME, INPUT_COLUMNS)
if reader.validate_labels() === True:
row1_column1 = reader.get_value('column1')
row1_column2 = reader.get_value('column2')
print('Column1: {}, Column2: {}'.format(row1_column1, row1_column2))
reader.next_row()
row2_column1 = reader.get_value('column1')
row2_column2 = reader.get_value('column2')
print('Column1: {}, Column2: {}'.format(row1_column1, row1_column2))
reader.close()
Usage (Writer)
OUTPUT_FILE_NAME = 'output.xlsx'
OUTPUT_COLUMNS = {
'column1': {
'label': 'Label 1',
'column': 'A'
},
'column2': {
'label': 'Label 2',
'column': 'B'
}
}
writer = takeme_openpyxl.ExcelWriter(OUTPUT_COLUMNS)
writer.write('column1', 'Row1: Column1')
writer.write('column2', 'Row1: Column2')
writer.next_row()
writer.write('column1', 'Row2: Column1')
writer.write('column2', 'Row2: Column2')
writer.flush(OUTPUT_FILE_NAME)
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
takeme_openpyxl-1.0.2.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file takeme_openpyxl-1.0.2.tar.gz
.
File metadata
- Download URL: takeme_openpyxl-1.0.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 772195550847dd4646ceab0656a569d09c9ce32c89a54cd6ee31a8832efbe820 |
|
MD5 | d29c36ce8bb346b49b260c3698184f8e |
|
BLAKE2b-256 | a9bed9eb39c7ebb743c19bb529fce504e3d3559c68519c95a35b4c0233e14bf0 |
File details
Details for the file takeme_openpyxl-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: takeme_openpyxl-1.0.2-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d746163ed9e20025e83e1691341107a17823249409537289758d5f74c52fa5a |
|
MD5 | 1a8a2de692bde83c52dfd57c51c77c86 |
|
BLAKE2b-256 | 46953a169abbdc4b0232de3eeec2d3971819a853605f39da0a996d6de8c4b039 |