Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

Exports the contents of a dataset as a CSV file, prompting the user to save the file to disk. Note that, 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.

Syntax

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

  • Parameters

String filename - A suggested filename to save as.

boolean showHeaders - If true (1), the CSV file will include a header row.

Dataset dataset - The dataset to export.

  • 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
#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, table.data)
if filePath != None:
	system.net.openURL("file:///"+filePath.replace('\\','/'))

Keywords

system dataset exportCSV, dataset.exportCSV

  • No labels