Skip to main content
Version: 8.1

system.dataset.exportHTML

This function is used in Python Scripting.

Description

Exports the contents of a dataset to an HTML page. Prompts the user to save the file to disk.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.dataset.exportHTML(filename, showHeaders, dataset, title)

Parameters

TypeParameterDescription
StringfilenameA suggested filename to save as.
BooleanshowHeadersIf true, the HTML table will include a header row.
Dataset / PyDatasetdatasetThe dataset to export.
StringtitleThe title for the HTML page.

Returns

String - The path to the saved file, or None if the action was canceled by the user.

Scope

Vision Client

Code Examples

Code Snippet - Export Then Open
# This snippet prompts the user to save the data currently displayed in a Vision Table component to an HTML file, and opens the file in the default web  browser after a successful save.

table = event.source.parent.getComponent("Table")
filePath = system.dataset.exportHTML("data.html", 1, table.data, "Production Report")
if filePath != None:
system.net.openURL("file://"+filePath)

Keywords

system dataset exportHTML, dataset.exportHTML