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.3.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file takeme_openpyxl-1.0.3.tar.gz
.
File metadata
- Download URL: takeme_openpyxl-1.0.3.tar.gz
- Upload date:
- Size: 3.1 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 | a4950801fe5af64fc458378195cfdf11f2c1da2c39f1f9586125956a117a3bc7 |
|
MD5 | d6b26c5f595964c9e10929a69b406fee |
|
BLAKE2b-256 | 0e1e53be715a1bb87fca32d5082d9c60589137db3999295a979017dc7bf01804 |
File details
Details for the file takeme_openpyxl-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: takeme_openpyxl-1.0.3-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 | 7cb0ab6044acfca3fdc3ab56cee8021a90953686d30e433a10df6999ec7e61f8 |
|
MD5 | d773464248b99e54e0dd08184a729f95 |
|
BLAKE2b-256 | 866edb5c4ed95ff1421407f01af45097c04a7e2c014cae710accef3dbb5d20b2 |