Spreadsheet Formula
Spreadsheet formula syntax highlighting for Sublime Text. Support for Excel, Google Sheets, LibreOffice Calc.
Details
Installs
- Total 1K
- Win 719
- Mac 298
- Linux 41
Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 4 | 5 | 0 | 1 | 3 | 4 | 2 | 7 | 5 | 0 | 0 | 1 | 0 | 3 | 2 | 1 | 0 | 0 | 1 | 5 | 0 | 0 | 2 | 0 | 0 | 1 | 1 | 0 | 3 | 2 | 0 | 0 | 1 | 0 | 0 | 2 | 1 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 1 |
Mac | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 2 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Spreadsheet Formula for Sublime Text
Spreadsheet formula syntax highlighting for Sublime Text. This syntax was originally intended to only provide support for Excel formulae, but now also supports both Google Sheets and LibreOffice Calc formulae.
Features
- Syntax highlighting for spreadsheet formulae used in Excel, Google Sheets, and LibreOffice Calc
- Built-in function completions
- Support for locale-specific separators
- SQL highlighting when using the
QUERY()
function in Google Sheets
Installation
Install via Package Control.
Usage
- In Sublime, open or navigate to a
.txt
file containing the spreadsheet formulae you wish to be highlighted (or create a new file with Ctrl+N). - Activation options:
- Depending on what spreadsheet application you plan on using, select the corresponding “(…) formula” syntax option from the syntax selection menu at the bottom right of Sublime Text.
- Alternatively, open the Command Palette and type “formula”. Select the option corresponding to your application of choice (“Set Syntax: (…) formula”).
- Enjoy!
New files will be saved with a two-level extension to signal Sublime Text to use the right syntax in the future.
Localization
Some locales use different characters for decimal numbers, function argument
separators, and array separators. If your locale differs from the characters
chosen by this package (US, decimal: .
, argument: ,
, row: ,
, column: ;
),
you can make small extension syntax files to enable your local preferences.
Add a file containing one of the below code blocks in your Packages/User
folder,
then modify the regular expression patterns in the variables:
context to match your locale's format.
- Since certain characters serve special roles in regex patterns, you can specify them as literal characters with \
.
- E.g., .
, *
, and \
must be made literal like \.
, \*
, and \\
in order for them to be used in the below variables.
The below examples denote a French locale with (FR)
and fr
where applicable.
If using Excel:
Filename Excel Formula (FR).sublime-syntax
:
%YAML 1.2
---
name: Excel Formula (FR)
scope: source.sheet.excel.fr
version: 2
extends: Excel Formula.sublime-syntax
file_extensions:
- fr.xls.txt
variables:
array_column_separator: ';'
array_row_separator: '\\'
number_radix: ','
argument_separator: ';'
If using Google Sheets:
Filename Google Sheets Formula (FR).sublime-syntax
:
%YAML 1.2
---
name: Google Sheets Formula (FR)
scope: source.sheet.google.fr
version: 2
extends: Google Sheets Formula.sublime-syntax
file_extensions:
- fr.google.txt
variables:
array_column_separator: ';'
array_row_separator: '\\'
number_radix: ','
argument_separator: ';'
If using LibreOffice Calc:
Filename LibreOffice Calc Formula (FR).sublime-syntax
:
%YAML 1.2
---
name: LibreOffice Calc Formula (FR)
scope: source.sheet.libre.fr
version: 2
extends: LibreOffice Calc Formula.sublime-syntax
file_extensions:
- fr.localc.txt
variables:
array_column_separator: ';'
array_row_separator: '\\'
number_radix: ','
argument_separator: ';'
Contributing
Issues
Please send any bug reports or suggestions by opening an issue on Github or to _alco via a direct message on Discord. You can find me on the official Sublime Text Discord server.
Credits
Made by _alco and michaelblyons. Thanks to acid_form for the first key bug reports we've received and for scraping the Google Sheets builtin functions.
A huge thank you to michaelblyons for his collaboration.