Python implementation of Excel's `text` function
Project description
excel-text
Python implementation of Excel's text
function.
The 1900 bug is reproduced.
Upstream docs
- https://support.microsoft.com/en-us/office/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c
- https://docs.microsoft.com/en-us/office/troubleshoot/excel/wrongly-assumes-1900-is-leap-year
- https://www.quora.com/Why-wont-Microsoft-fix-the-1900-leap-year-bug-that-exists-in-Excel
Examples
- Currency with thousands separators and decimals.
=TEXT(1234.567,"$#,##0.00")
=$1,234.57
- Date and time functions.
=TEXT(10,"MM/DD/YYYY")
=01/10/1900
- Percentages
=TEXT(0.285,"0.0%")
=28.5%
- Leading zeros
=TEXT(1234,"0000000")
=0001234
- Custom Latitude/longitude
=TEXT(123456,"##0° 00' 00''")
=12° 34' 56''
Limitations
- Filling with
*
is not supported. @
is not supported in the format argument.- Single quotation marks
'
are not supported for inserting strings. Double quotation marks"
must be used. - String characters that can be incorrectly interpreted as datetime options can only be used if used with quotation marks.
- When
[]
are used for date/datetime/time, only the first character in the brackets will be used.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
excel-text-0.0.1.tar.gz
(15.3 kB
view details)
Built Distribution
File details
Details for the file excel-text-0.0.1.tar.gz
.
File metadata
- Download URL: excel-text-0.0.1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 266cab25cbf3f3770a0fc9845d0adb2763690f8e44d2752a6bd547b214842069 |
|
MD5 | 42642639dae9911d5ada2a7520cd8704 |
|
BLAKE2b-256 | 25af870f737708f91fbeb394f185230e2352116251cf6458ee8a6b44d1336df4 |
File details
Details for the file excel_text-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: excel_text-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c62f2255d1417e003292365b88df3b1aef18f6353088c77b57fb84818f121cf |
|
MD5 | 6a85bed0f1743e6b65aee4a26abd6999 |
|
BLAKE2b-256 | 4c142a35057f6c23b063461f08717c5865bbd95960e6e43ea4603efe94f53c4f |