Skip to main content
Version: 8.1


This function is used in Python Scripting.


Exports the contents of a dataset as a CSV file, prompting the user to save the file to disk. To write silently to a file, you cannot use the dataset.export* functions. Instead, use the toCSV() function.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.


system.dataset.exportCSV(filename, showHeaders, dataset)


StringfilenameA suggested filename to save as.
BooleanshowHeadersIf true, the CSV file will include a header row.
DatasetdatasetThe dataset to export.


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


Vision Client

Code Examples

Code Snippet
# This snippet would prompt the user to save the data currently displayed in a Table component to a CSV file, and would open the file (in an external program, presumably Excel) after a successful save.

table = event.source.parent.getComponent("Table")
filePath = system.dataset.exportCSV("data.csv", 1,
if filePath != None:"file:///"+filePath.replace('\\','/'))


system dataset exportCSV, dataset.exportCSV