Skip to main content

system.mes.dashboard.exportWidgetsAsCsv

Description

Exports dashboard widgets as raw bytes in CSV format (UTF-8 encoded). Use the no-argument form to export all widgets, or pass a list of widget IDs or names to export only those selected widgets.

Syntax

system.mes.dashboard.exportWidgetsAsCsv()
system.mes.dashboard.exportWidgetsAsCsv(idsOrNames)

Parameters

Method 1: No Parameters (Export All Widgets)

ParameterTypeNullableDescription
None--This method does not take any parameters.

Method 2: Export Selected Widgets by ID or Name

ParameterTypeNullableDescription
idsOrNamesList<String>FalseA list of widget IDs or names to export.

Returns

A Byte array (Byte[]) containing the raw CSV bytes of the exported widgets.

Code Examples

Perspective: Export All Widgets

csvBytes = system.mes.dashboard.exportWidgetsAsCsv()
system.perspective.download("widgets.csv", csvBytes)

Perspective: Export Selected Widgets by Name

csvBytes = system.mes.dashboard.exportWidgetsAsCsv(["Time Series", "Summary"])
system.perspective.download("widgets.csv", csvBytes)