Skip to main content

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.1.0

  • Fixed logic error when converting int to a1 notation using int_to_a1() with starting_index = 0 results in wrong answer being returned. I.e.
int_to_a1(26, 0) # return "[" (should be "AA")
int_to_a1(52, 0) # return "A[" (should be "BA")
  • Added function column_row_to_a1() to convert provided column and row into a1 notation.
  • Added function a1_to_column_row() to convert provided a1 notation into dictionary that contains column and row keys.

Version 1.1.1

  • Added 'starting_index' argument for function a1_to_int() to allow specification of value of "A".

Version 1.1.2

  • Fixed an error where function a1_to_column_row()'s return value having the wrong data type. I.e. for the dictionary being returned, the value of key "row" is a string instead of integer.

Version 1.1.3

  • Added value check for argument 'column' and 'row' of function 'column_row_to_a1()'. The argument value cannot be less than 1.

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.


Example

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.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for a1-notation-converter 1.1.3
File Size Uploaded Provenance
a1_notation_converter-1.1.3.tar.gz 4.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for a1-notation-converter 1.1.3
File Interpreter ABI Platform
a1_notation_converter-1.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / a1_notation_converter-1.1.3.tar.gz

Download URL a1_notation_converter-1.1.3.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b9e885c7c63f8670c0fafa9faa18c72042428d21ae92f82a799d0f8a6742cfca
BLAKE2b-256 checksum
How to use checksums
0877ed7d3d8ae83d19a553aeec8856941d094fb2222cb6cd4795175eaaa17c72
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.1.3-py3-none-any.whl

Download URL a1_notation_converter-1.1.3-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1f6064016262ea6b93ad1d44fab43939bda05fa51fe4922bc2e3c4d58a306f8
BLAKE2b-256 checksum
How to use checksums
a9bef53fc77bcacfbca4cd2bd2aaf80682d88e759cc3690d24b6eda91e078552
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.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page