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.Reader(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.Writer(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.1.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file takeme_openpyxl-1.0.1.tar.gz
.
File metadata
- Download URL: takeme_openpyxl-1.0.1.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 | b6761474c896c7546e46fb94df2235a9e8e54698c675557856d024d5cde2f2d5 |
|
MD5 | 3a4cd1d6f85548bc25ac9d76dd41689f |
|
BLAKE2b-256 | 266ad0c5a43dd576a684bb649a1bab05727dbd906ae84bdfe5ef02743fa93ab6 |
File details
Details for the file takeme_openpyxl-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: takeme_openpyxl-1.0.1-py3-none-any.whl
- Upload date:
- Size: 16.0 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 | 791dde684233acf86076ec13efb1e50c478a867baac513fa0ac4097dfd6b9225 |
|
MD5 | d7af76cd65ed8d0ec53a95ff455b03d6 |
|
BLAKE2b-256 | 74e6800f4a1c06d9bf4d95b15227bb24d7d24b8717d3cb7cd0a36dc6960357c0 |