Skip to content

Time Series Import with Macros

Time Series Import with Macros

Time series can be automatically imported from CSV, TXT, XLSX, XLSM, XLSB, and XLS files into ETA using macros. This article describes how to do this.

The automated import of time series into TOP-Energy using the TOP-Energy component Time_Series_ImportExport, without having to open ETA every time, is explained separately in the article about the TOP-Energy Import-Macro.

Creating and Editing Import Macros

To create a macro for importing time series in ETA, you must first open the time series to be imported in ETA.

Then start the creation of the macro via the entries in the ETA menu bar File → Import → Create/Edit import macro (see following figure).

Create/Edit import macro

The following window opens.

Import Macro

You can create a new macro by means of the Ein neues Makro anlegen button.

If macros have already been created they appear in the drop-down list for selection.

The following buttons are used to execute, save, and delete macros:

   Ausgewähltes Makro ausführen Execute the chosen macro,

   Aktuelles Makro speichern Save current macro,

   Ausgewähltes Makro löschen Delete the chosen macro.

To edit, delete or execute created macro steps (actions), the context menu, which can be accessed by right-clicking on the macro step (see following figure), and the following buttons are available:

  Aktion bearbeiten Edit action,

  Aktion löschen Delete action,

  Bis Aktion ausführen Run to action.

edit actions

Load File

The first step to create a new macro or an unsaved macro is to load a time series. To do this, click the Load File button located in the bottom right corner of the Edit Macro window.

In the window that opens, select the file to be loaded that contains the time series to be imported (see following figure). When selecting the time series to be imported, please refer to the notes on the file format.

Import files

After confirming with Open, this step is automatically recorded as Load File under Macro Steps. A preview of the raw data is displayed in the lower part of the window (see following figure).

Macro steps

The automatically recognized Delimiter shall be checked and, if necessary, corrected.

Parse Raw Data

The following window appears, in which the macro step Parse raw data using delimiter is recorded.

Macro Steps

Edit Import Columns

As with Simple Time Series Import, the assignments of the time and date columns must be checked and, if necessary, corrected under Data Processing. Each column to be imported is then selected with a check mark in the table header. A small window opens in which the column can be renamed and the unit assigned (see following slider).

Checkmark
Checkmark

Checkmark

Assign the value of the component, if necessary

Assign the value of the component, if necessary

Select unit

Select unit

CheckmarkAssign the value of the component, if necessarySelect unit

After confirming with OK, the import is recorded as a further Macro Step, e.g., with Create … from column … or with Overwrite … if overwriting a TOP-Energy component was selected.

As with Simple Time Series Import, the time series to be imported can then be previewed and edited if necessary. To do this, select it in the window under Imported time series (see the figure below).

Time series preview

To add more time series, repeat the steps from Load file.

The other Macro Steps are also recorded in the list.

Once all time series have been compiled for import, confirm with OK at the bottom right (see previous figure).

The message Save changes to current macro? is answered with Yes. If an existing macro is to be overwritten, this must be confirmed. If a previously unsaved macro is to be saved its name must be entered (see following figure). The window for editing an import macro then closes.

Macro Name

Run Import Macro

To execute the import macro, select the Import using macro menu item (see the following figure).

Import using macro

This opens the following window for importing time series.

Import using macro

In the drop-down list above select the macro to be used, in the following example Power_Demand (see following figure).

Select the import macro

The macro is then loaded and displayed as shown in the following figure. A click on OK in the lower right corner of the window starts running the macro.

Import using macro

Video

How to create and run an import macro in the Engineering Time Series Analyzer (ETA) you can learn in the following video. The import macro allows an automatic import of time series into ETA.

Automatic Time Series Import with Macros

Back To Top