1 /*! `excel` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
7 Language: Excel formulae
8 Author: Victor Zhou <OiCMudkips@users.noreply.github.com>
9 Description: Excel formulae
10 Website: https://products.office.com/en-us/excel/
14 /** @type LanguageFn */
15 function excel(hljs
) {
16 // built-in functions imported from https://web.archive.org/web/20241205190205/https://support.microsoft.com/en-us/office/excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188
122 "CUBEMEMBERPROPERTY",
200 "FORECAST.ETS.CONFINT",
201 "FORECAST.ETS.SEASONALITY",
533 name: 'Excel formulae',
538 case_insensitive: true,
540 $pattern: /[a-zA-Z][\w\.]*/,
545 /* matches a beginning equal sign found in Excel formula examples */
549 illegal: /=/, /* only allow single equal sign at front
of line */
552 /* technically, there can be more than 2 letters in column names, but this prevents conflict with some keywords */
554 /* matches a reference to a single cell */
556 begin: /\b[A-Z]{1,2}\d+\b/,
562 /* matches a reference to a range of cells */
564 begin: /[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,
567 hljs
.BACKSLASH_ESCAPE
,
568 hljs
.QUOTE_STRING_MODE
,
571 begin: hljs
.NUMBER_RE
+ '(%)?',
574 /* Excel formula comments are done by putting the comment in a function call to N() */
575 hljs
.COMMENT(/\bN\(/, /\)/,
589 hljs
.registerLanguage('excel', hljsGrammar
);