Export To HTML


ExportToHtml.SK

  • ExportToHtml() function is used to generate HTML files from HTML template.
  • To perform this function, we need to type formula in formula bar i.e. =ExportToHtml.SK() as shown in Fig.

exporttohtml


ExportToHtml() function accepts the following arguments:

  • Template: Provide the path of HTML template. (Use Relative path of HTML template)
  • ToFile: This field accepts a Boolean value (TRUE/FALSE).
  • File: If Tofile field has TRUE value, provide the path for the output file that will be generated. If no path is provided, then output file will be generated on the Temporary (TEMP) path within SheetKraft Folder.
  • StaticTags: Array or range of static tag names. Static tags are the fields that are fixed and have one-to-one mapping with the values that are provided in Excel. These tags should match exactly with the tag names provided in the HTML template file.

exporttohtml


  • StaticValues: Array or range of values corresponding to the static tag names.
  • RepeatTags: Array or range of repeating tag names. (Provide the tag names whose fields are to be repeated.)

exporttohtml


  • RepeatRange1: Range corresponding to the first repeat tag. (Provide the column data for the fields that will be repeated.)
  • ReportTags1: Array or range of tags in the first repeat range. (Provide the tags to be exported to the html file as a header to the list or table.). For example: column_1 and column_2 is the report tags (ReportTags1) within the first repeat tag as shown in the following code block: Here the column fields are to be repeated within table having repeat tag as table tag.
  • Report1: Provide the order/sequence of data that will be exported to html. The data is provided within the Report.SK() function.
  • After Report1 field, data for second repeat tags are provided, that is, RepeatRange, ReportTags, and Report.SK () respectively. Providing all the details of arguments in the ExportToHtml() function, will generate the HTML file.

Sample HTML Format:

exporttohtml


Before selecting the option for Exporttohtml, the data in the HTML template should be made familiar with the required/relevant Tags in Function arguments.

  • Provide Function Arguments As per HTML Template.
  • Mention StaticTags, StaticValues, RepeatTags Present in HTML Template along with all other arguments as shown in fig.

exporttohtml


  • Click on the Run Book button to run Workbook. Output file will Generated at the folder where ,we provide path to export HTML file or output file will be generated on the Temporary (TEMP) path within SheetKraft Folder.