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.0.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file takeme_openpyxl-1.0.0.tar.gz
.
File metadata
- Download URL: takeme_openpyxl-1.0.0.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 | c2edc8f1f3c718826317bfd37f7ff3fd41127aa2ce2fbe2dba3e142fe32283ec |
|
MD5 | b63380649cc37c1d315cbbeb6ff19867 |
|
BLAKE2b-256 | 8a6b79d2489bf647d9d72d6557694251cc557e3b0be3c60e211bba99e31d7643 |
File details
Details for the file takeme_openpyxl-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: takeme_openpyxl-1.0.0-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 | b73ea10c9c669b87a81e8710efb50de3ff39b6c63e363aec65c841a01514206a |
|
MD5 | c4fd70d152932b49b8b42bedf3e404f7 |
|
BLAKE2b-256 | d0c638058c564d132923ff3b32bf3fe18cc71fd3f4a3acde92ef25ac49153493 |