Export CSV

Exports data for a metering-point measured variable to a separate CSV file on a daily, monthly or annual basis. The minimum data status required for the export to be completed successfully can be specified. The timestamp of the last exported record is saved, so that this workflow can be run on a recurring basis (for example, daily) and thus continuously export data. Alternatively, you can use test mode to export data without changing the last export date. A destination folder can be specified for the CSV file and/or a list of email recipients can be provided. The parameters written to the file can be specified individually.

Where can I find this workflow?

Data Collection section => Metering point => Measured variables => Automation

Parameters

Minimum status

Selection – Defines the minimum measured value status for a value. If the status is worse than that stated here, no processing will take place.

Export period

Selection – Specifies the time period to be exported. The “Last export date” parameter is used as the basis.

  • Daily: Starting on the day after the last export date. An export is carried out every day.
  • Monthly: A full month starting from the last export date. An export is carried out for each month.
  • Annual: A full year starting from the last export date. An export is carried out for each year.

Time span

Defines how the time span of the action is determined.

  • Latest: The time elapsed between the last record and the time of execution.
  • Complete: The entire time span, starting from the timestamp of the first record.
  • Number of days: Full days in the past, counting from the time of execution.
  • Time range: Specify the start and end times precisely.

Last [Export / Calculation] date

The timestamp of the record processed by the last successful operation. Only active if “Latest” is selected as the time span.

Time range

Start date / End date – Specifies the time range during which the action is to be carried out. Only active if “Time range” is selected as the time span.

Test mode

Yes / No – In test mode, data is processed from the time of execution. The time span is calculated using the “Offset for test mode” parameter. The “Last export date” parameter is ignored and is not updated. This means that the export for a given period can be carried out multiple times.

Offset for test mode

Selection – Defines the time span for “Test mode”, depending on the “Export period” parameter.

  • Daily “Export period”: Number of days in the past, starting from the current day. The current day is not included.
  • Monthly “Export period”: Number of full months in the past, starting from the current month. The current month is not included.
  • Annual “Export period”: Number of full years in the past, starting from the current year. The current year is not included.

Output directory

Text – Specify a directory name or share.

Directory

  • Disabled or SMB share
  • Path to the directory (optional)
  • Server
  • Share
  • Authentication
  • SMB version
  • Transport type
  • Authentication method

Disabled / SMB share

Selection

  • Disabled – No output directory
  • SMB share – Requires details of the shared directory.

Path to the directory

Text (optional) – Path

Server

Text / IP address – FQDN – name or IP address

Share

Text – Name of the share

Authentication

  • Anonymous – No user account required
  • Domain (optional) – Name of the share domain
  • Username – Name of the user with access to the share
  • Password – Password of the user with access to the share

SMB version

Can usually be left at the default setting

  • 3.1.1 (Default)
  • 2.0

Transport type

  • Direct over TCP
  • NetBIOS over TCP

Authentication method

  • Detect automatically (default)
  • NTLM V2
  • NTLM V1 with enhanced security
  • NTLM V1

Target folder

Selection – Select the visual energy folder in which to save the output file.

Email recipient list

Text – Specifies the recipients to whom the email should be sent. Recipients can be separated by semicolons.

Delimiter

Selection

  • Semicolon
  • Tab

Table header / header row

Yes / No

  • Output parameter: Should the output include a table header (column headings)?
  • Input parameter: Does the table have a table header (column headings)?

List of fields

Selection – Select the fields for output. Different formats are available for dates and numbers.

  • N0–N3 specify the number of decimal places in the number format (e.g. N3: 32.452).
  • For S1–S3, the number is displayed with the relevant decimal places, but without any separators (e.g. S3: 32452).
  • For some fields, a fixed character length of between 1 and 100 can be defined. If the value is shorter, spaces are added to make up the length; if it is longer, it is truncated to the defined character length. The variable “Value” is an exception. For this variable, the specified character length is achieved using leading zeros. The default value of 0 means that the length of the field is not changed.

The fields:

  • MP (ID)
  • Start (local)
  • End (local)
  • Value
  • Unit
  • Status
  • OBIS (code, short)
  • OBIS (name, short)
  • OBIS (code, long)
  • OBIS (name, long)
  • MP (name)
  • MP (number)
  • MP (installation location)
  • MP (GUID)
  • Location (name)
  • Time zone (ID)
  • Time zone (display name)
  • Time zone (standard name)
  • Time zone (base UTC offset)
  • Start (UTC)
  • End (UTC)
  • Constant 1
  • Constant 2
  • Constant 3
  • Constant 4
  • Constant 5

Completion trigger

Trigger – Specifies the trigger that is executed once the workflow has finished.

Version

Date

Change

3.23

12/04/2025

Export Directory” argument title renamed to “Directory”

3.22

11/26/2025

“Target Directory” argument replaced with “Export Directory”

3.21

11/13/2025

“Target Directory” argument description updated

3.20

03/02/2022

Limited start date for the “continuous” function

3.19

02/14/2023

FIX: Incorrect time range with OBIS of type ObisCodeType.CumulatedDayMax

3.18

12/15/2022

Changed to use automation server settings

3.17

05/20/2022

FIX: Incorrect time range with time zone

3.16

05/20/2022

Added parameters timerangechoice and timerange

3.15

05/02/2022

FIX: Incorrect date and time conversions using the local time zone instead of the location time zone.

3.14

04/13/2022

FIX: The workflow creates invalid files for the “Month” export interval. The first file contains data for just one day.

3.13

07/07/2021

Description updated

3.12

06/14/2021

Extended SMTP options

3.11

01/12/2021

FIX: Error when saving to a folder that no longer exists

3.10

12/07/2020

Added the source workflow ID to the CSV document

3.9

07/22/2020

Added “yearly” value to “Export timespan”

3.8

07/14/2020

Added the “DocumentTargetFolder” argument

3.7

05/15/2019

Description updated

3.6

07/30/2018

FIX: The workflow creates invalid files if meter values are exported.

3.5

05/23/2018

FIX: The workflow creates invalid files if there is no data are available for a time span.

3.4

03/19/2018

FIX: The workflow creates invalid files if there is a gap in the source data.

3.3

02/06/2018

FIX: The last day is not exported if the data ends exactly with a value at the end of the day (e.g. 30/01/2018 23:00).

3.2

10/23/2017

TargetDirectory/Recipients parameters validated

3.1

11/13/2017

Additional FieldSet parameter

3.0

05/12/2017

Multi-target workflows

2.2

05/24/2017

The workflow terminates with an exception if the email settings in the automation server settings are not configured.