[]
You can use ReportSheet to define an alias for the template cell, which you can use in a formula.
To set an alias for a template cell, you can use the following code sample:
const templateCell = {
type: 'List',
binding: 'SalesTable[sales]',
alias: 'sales',
};
templateSheet.setTemplateCell(0, 0, templateCell);
templateSheet.setFormula(1, 0, '=SUM(sales)'); // same as the templateSheet.setFormula(1, 0, '=SUM(A1)');
Notes:
Alias must be unique in one TemplateSheet.
Alias is case insensitive and accepts a maximum of 255 characters.
The first character of the alias must be a letter, an underscore character (_), or a backslash (\).
The remaining characters in the name can be letters, numbers, periods, and underscore characters.
Excel shortcuts for choosing columns/rows ("C", "c", "R", or "r") are not permitted.
No cell references, like Z$100 or R1C1, are allowed. Using at least 4 letters followed by a number is considered valid.
The cell alias can only be used in the formula in the sheet, but not in the other functions, such as conditional format, data validation, etc.