A1 notation converter
The A1 notation converter library allows the user to convert integer to its A1 notation form and vice versa. In this context, the A1 notation refer to the syntax used in spreadsheet program such as Google Sheets and Microsoft Excel to represent the index of column within the spreadhseet.
E.g. 'G' represents 7th column, 'AZ' represents 52th column.
Latest releases
Version 1.2.0
- Added class
A1Notation.
from a1_notation_converter.A1Notation import *
# default object instantiation
n1 = A1Notation("A12")
print(n1.a1_notation) # print "A12"
print(n1.column) # print 1
print(n1.row) # print 12
n1.column = 3 # set the column value to 3 and changed the a1_notation value
print(n1.a1_notation) # print "C12"
# object instantiation with column and row
n2 = A1Notation.from_column_row(column = 3, row = 23)
print(n2.a1_notation) # print "C23"
# A1Notation arithmetic
n3 = A1Notation("B11")
n4 = A1Notation("D2")
n5 = n3 + n4 # add the A1Notation objects' column and row together
print(n5.a1_notation) # print "F13"
n6 = n3 + [4, 5] # add 4 with n3.column, and add 5 with n3.row
print(n6.a1_notation) # print "F16"
n7 = n3 + (4, 5) # add 4 with n3.column, and add 5 with n3.row
print(n7.a1_notation) # print "F16"
n8 = n3 + {"column" : 4, "row" : 5} # add dictionary's 'column' and 'row' value with A1Notation object's column and row
print(n8.a1_notation) # print "F16"
Installation
Installation of this library can be done with Python pip:
pip install a1-notation-converter
The package and release history can be found at pypi.org.
Quickstart
Importing the library:
from a1_notation_converter import a1_converter
Converting integer to A1 notation:
a1_converter.int_to_a1(1) # return "A"
a1_converter.int_to_a1(27) # return "AA"
a1_converter.int_to_a1(731) # return "ABC"
Converting A1 notation to integer:
a1_converter.a1_to_int("A") # return 1
a1_converter.a1_to_int("AA") # return 27
a1_converter.a1_to_int("CBA") # return 2081
Documentation
Documentation can be found at this GitHub repository.
Metadata
Release files for a1-notation-converter 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| a1_notation_converter-1.2.0.tar.gz | 8.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| a1_notation_converter-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / a1_notation_converter-1.2.0.tar.gz
| Download URL | a1_notation_converter-1.2.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b969c0a52b65567d7e8c7aeb4d83438836e7278471770814461f8715aa0cf2d5
|
|
BLAKE2b-256 checksum How to use checksums |
b66fb3de48fb7c56edc8c6626244214601169bb0e3b7d7c3af1b304741861c9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.3
|
Release files / a1_notation_converter-1.2.0-py3-none-any.whl
| Download URL | a1_notation_converter-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e96943ca3484b8640abde0e5d5066583472671c7553a38d9139543fea42c923
|
|
BLAKE2b-256 checksum How to use checksums |
026f1b414787a24ba7447f6abc0947ef928a71597a8372c9eeaf31991d18374b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.3
|
Security for a1-notation-converter 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.