Used to process text templates.
The method iterates through a template and fills it out with values from the context of the app item you pass.
Result of iterating with a templater.
The method analyzes .xls, .xlsx, and .csv files.
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, and cells is a collection of cells in a row.
pages
rows
cells
Your review is successfully sent!
Feedback sent successfully
Templater object
Used to process text templates.
Hierarchy
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:
Here
pagesis a collection of sheets in the file,rowsis a collection of rows on a sheet, andcellsis a collection of cells in a row.