Hierarchy
- Templater
Methods
generateText
-
The method iterates through a template and fills it out with values from the context of the app item you pass.
Parameters
-
item: RefItem
-
template: string
Returns Promise<string>
Result of iterating with a templater.
-
parseSpreadsheet
-
The method analyzes .xls, .xlsx, and .csv files.
Parameters
-
file_id: string
-
Optional options: ParseSpreadsheetOptions
Returns Promise<ParseSpreadsheetResponse>
Pages and only filled out rows and cells.
Example of calling the analyzer:const file_id = file.id const options: ParseSpreadsheetOptions = { separator: ';' }; const text = await System.templater.parseSpreadsheet(file_id, options);
The result in JSON:
{ 'pages': [ { 'index': 0, 'name': 'Sheet1', 'rows': [ { 'cells': [ { 'index': 3, 'value': '5' } ], 'index': 2 } ] } ] }
Here
pages
is a collection of sheets in the file,rows
is a collection of rows on a sheet, andcells
is a collection of cells in a row. -
Templater object
Used to process text templates.