CreateExportTemplate
  • 1 Minute to read
  • Dark
    Light
  • PDF

CreateExportTemplate

  • Dark
    Light
  • PDF

Article summary

Creates an export template for use with ExportIntoWorkbook and ExportIntoTable.

KeyValueDescription
method"CreateExportTemplate"Creates an export template for use with ExportIntoWorkbook
name"TemplateName"Name of template.
This is the name that will be used to identify the template in methods that make use of it.
filename"PathAndFilename.xlsx"Full path and filename to the excel spreadsheet that contains template formatting. 
worksheet"WorksheetName"Worksheet name containing template data
headerRowRowNumRow Containing header data
project"ProjectName"Current project name.

When Exporting data from a table to a workbook, it is possible to use a workbook that has a template applied.   The template determines the formatting of the generated workbook.

Before a template can be applied in ExportIntoWorkbook, it must first be created using CreateExportTemplate

{
  "method": "CreateExportTemplate",
  "name": "Export Template 1",
  "fromWorkbook": {
    "filename": "%DATAPATH%/a.xlsx",
    "worksheet": "Index",
    "headerRow": 2
  },
  "project": "MyProject"
}

ExportTemplates can also be used to determine which fields to export when using ExportIntoTable.     ExportIntoTable will extract field names from the ExportTemplate, and export only those fields into the new table.




Was this article helpful?