Search Shortcut cmd + k | ctrl + k
Search cmd+k ctrl+k
Dark Mode
1.1 (stable)
Excel Extension

The excel extension, unlike what its name may suggest, does not provide support for reading Excel files. Instead, provides a function that wraps the number formatting functionality of the i18npool library, which formats numbers per Excel's formatting rules.

Excel files can be currently handled through the spatial extension: see the Excel Import and Excel Export pages for instructions.

Installing and Loading

The excel extension will be transparently autoloaded on first use from the official extension repository. If you would like to install and load it manually, run:

INSTALL excel;
LOAD excel;

Functions

Function Description
excel_text(number, format_string) Format the given number per the rules given in the format_string.
text(number, format_string) Alias for excel_text.

Examples

SELECT excel_text(1_234_567.897, 'h:mm AM/PM') AS timestamp;
timestamp
9:31 PM
SELECT excel_text(1_234_567.897, 'h AM/PM') AS timestamp;
timestamp
9 PM