====== Excel Exporter ======
There is a command line tool called Excel Exporter available that can help you create fully customizable Microsoft Excel reports from your Mervis DB data.
It's based on custom template XLSX files where you can place data from Mervis DB using special syntax.
For more info contact [[en:help:energocentrum-plus|sales department]].
===== Example =====
In this example we demonstrate how to export single variable into Excel file.
You can see the raw data from database in: [[https://db.mervis.info/viewer2/#/graphView?shortId=f864dc|Mervis DB Viewer]].
{{ :en:mervis-db:excel_exporter_viewer.png?direct&800 |}}
==== Configuration File ====
First you have to create a configuration XML file where you define mapping between a set of keys describing individual Mervis DB variable and some Variable Name that will be used later in Excel template.
You can also define the name of output file and whether the file should be just updated or overwritten.
exceldemo.xlsx
exceldemo_[yyyy-MM-dd_HH-mm].xlsx
false
==== Excel Template ====
You can use a simple templating language to define which values from Mervis DB should go where in the output Excel file.
[YEAR:2016|MONTH:1|DAY:15|HOUR:12|MINUTE:0|VARIABLE:OutsideTemperature]
Any of the time-defining values can be omitted and will be replace by current date, time or values passed via command line parameters.
{{ :en:mervis-db:excel_exporter_template.png?direct&800 |}}
==== Run the Exporter ====
.\ESG.RcWareDb.DataExporter\ESG.RcWareDb.DataExporter.exe tmpPath:"ExcelDemo.xml" srvUrl:"http://db.mervis.info/db/energocentrum/RcWareDbAccess" srvUser:"exceldemo" srvPsw:"pfi4cj4qrj" timeTolerance:300 toleranceType:before
For more info options see .\ESG.RcWareDb.DataExporter\ESG.RcWareDb.DataExporter.exe --help
==== Output ====
The output file is defined in configuration XML file and the example output should look like this:
{{ :en:mervis-db:excel_exporter_output.png?direct&800 |}}
==== Download Full Example ====
Download: {{ :en:mervis-db:excelexporterdemo.zip |}}