Skip to main content

system.mes.location.exportAsCsv

Description

Exports all Locations as a CSV string (UTF-8 encoded). Streams location data from the database and formats it as a CSV string, including a header row.

Syntax

system.mes.location.exportAsCsv()

Parameters

No parameters.

Returns

All locations as a CSV string (UTF-8 encoded).

Code Examples

Perspective

csvString = system.mes.location.exportAsCsv()
system.perspective.download("locations.csv", csvBytes)

Script Console

csvString = system.mes.location.exportAsCsv()
path = system.file.saveFile("locations.csv")
if path is not None:
system.file.writeFile(path, csvString)