SpreadSheet

Basic concept

Configuration

In the configuration it is defined to which Eliona instance the connection should be made and which reports are created with which template.

Eliona Instance

{"eliona_handler": {
"host": "experimental.eliona.io",
"api": "https://experimental.eliona.io/api/v2", "project_id": 1,
"api_key": "slidfglsadbföabg$$äasfnasilbg"}
}

Reports

The configuration of the reports is located within a list. This can contain one or more reports. Each report requires at least these configurations.

"reportConfig": [
{
"name": "Report Monatlich Ebene 1", "schedule": "monthly",
"type": "DataEntry",
"templateFile": "./storage/reports/templates/Template_Report_Ebene_1.xlsx", "sheet": "Sheet1",
"separator":";",
"firstRow": "0", "fromTemplate": true,
"reportPath": "Report_Ebene1.xlsx", "tempPath": ""
},
{
"name": "Report Monatlich Ebene 2", "schedule": "monthly",
"type": "DataEntry",
"templateFile": "./storage/reports/templates/Template_Report_Ebene_2.xlsx", "sheet": "Sheet1",
"separator":";",
"firstRow": "0", "fromTemplate": true,
"reportPath": "Report_Ebene2.xlsx",
"tempPath": ""
}
]

Templates

The templates should be stored in Excel format and must contain the configuration of the assets. The link to the assets / attributes in Eliona looks like this:

{"assetGai":"H01 Fernwärme Energiezähler IWB", "attribute":"Energie", "raster":"MONTH", "mode":"sum"}

The required information is entered here in JSON format.

Berechnungen

Calculations are performed in Excel. All Excel functions can be used here. Referencing values from your own table as well as using values from Eliona is possible. When using values from Eliona, simply use the JSON part for referencing.

Example: Here a cell content is subtracted from an Eliona Asset attribute.

= ({"assetGai":"K01 Netz Energiezähler 1005", "attribute":"Energie", "raster":"MONTH", "mode":"sum"} - J6)

ATTENTION: Entering such a formula is prevented by Excel. For this purpose, the format of the cell must be adjusted. After entering the formula, the cell type can be reset. It is recommended to choose the number format.

DataListSequential

Has not been used so far. Has only been intended for one project in the bidding phase

DataListParallel (Liste parallel)

Example table

Beispiel Template

Details

DataEntry

Beispiel Tabelle:

Beispiel Template:

Creating a report manually

To create a report manually, the Docker container can be opened and App.py can be called with arguments. A help exists which can be called with -h.

(env311) spreadsheet-report-app % python ./src/spreadsheet-reportapp/
spreadsheet_report_app.py -h
usage: spreadsheet_report_app.py [-h] [-d DATE] [-c CONFIG] [-u USER] [-r REPORT] [-o OUTPUT]
options:
-h, --help show this help message and exit
-d DATE, --date DATE Date in the format: dd.mm.yyyy
-c CONFIG, --config CONFIG
Path to the used configuration file. For Example:
"./config/config.json"
-u USER, --user USER User name that's requested. Name can be read from config.json file.
-r REPORT, --report REPORT
Report name that's requested. Name can be read from config.json file.
-o OUTPUT, --output OUTPUT
Export file path. If empty will be stored under "./temp/file_name"
(env311) spreadsheet-report-app %

Last updated