Metric Export for Excel
The Metric Export delivers any metric of your plants as a CSV file that Excel and LibreOffice open directly. This page shows the everyday cases as ready-made links, and how to connect Excel to a link so that a workbook refreshes itself.
Prerequisites
- A Mirox account that may read the measurements of the plant you export.
- An API token of the group Metric Export — see API Token Usage. In a browser where you are logged in, a link works without a token.
The Easy Way: Copy the Link From the App
You do not have to build a link by hand.
Open in Mirox
Data Export ▸ Metrics — choose plants, metrics, time range and step. The API URL below the preview is the link of exactly that selection, including the components you chose. Try it out prepares a token and ready-made commands.
The recipes below show what these links look like, so you can adapt them.
Recipe 1: Production of One Plant at 15 Minutes
One week of grid feed-in, as energy per 15 minutes:
curl --compressed "https://service.mirox.io/api/v1/export/series?park=ABC123DEF456&metrics=plant.grid_feedin&start=2026-07-01&end=2026-07-07&step=15min&values=delta" \
-H "Authorization: Bearer YOUR_API_TOKEN" -o production_week.csv
Date;UTC offset;Grid feed-in (kWh)
2026-07-01 00:00;+02:00;0,0
2026-07-01 00:15;+02:00;0,0
2026-07-01 06:15;+02:00;1,3
...
- The times are the local time of the plant. The column UTC offset makes every row unambiguous, also on the day the clocks change.
offset_column=falseleaves it out;tz=utcexports in UTC. end=2026-07-07includes the 7th of July.- For a curve of the power instead of the energy, export
plant.grid_power.
Recipe 2: The Previous Month, Every Month
A link with a preset always delivers the most recent complete period. This is the link for a workbook that is refreshed once a month:
curl --compressed "https://service.mirox.io/api/v1/export/series?park=ABC123DEF456&metrics=plant.grid_feedin,plant.rad_pyranometer,availability.inverter_park&window=previous_month&step=day" \
-H "Authorization: Bearer YOUR_API_TOKEN" -o previous_month.csv
Date;Grid feed-in (kWh);Plant-plane radiation, pyranometer (kWh/m²);Inverter availability (park) (%)
2026-08-01;5321,4;6,8;99,6
...
Recipe 3: Several Plants Side by Side
One column per plant with multi_park_agg=split:
curl --compressed "https://service.mirox.io/api/v1/export/series?park=ABC123DEF456,DEF456ABC123&metrics=plant.grid_feedin&window=previous_month&step=day&multi_park_agg=split" \
-H "Authorization: Bearer YOUR_API_TOKEN" -o plants_compare.csv
Date;Sunnyside - Grid feed-in (kWh);Riverbend - Grid feed-in (kWh)
2026-08-01;5321,4;4102,9
...
multi_park_agg=merge, the default, gives one column for all plants together.portfolio=<uid>selects all plants of a portfolio.
Recipe 4: Every Inverter
A metric of the inverter level gives one column per inverter:
curl --compressed "https://service.mirox.io/api/v1/export/series?park=ABC123DEF456&metrics=inverter.ac&start=2026-07-01&end=2026-07-07&step=15min" \
-H "Authorization: Bearer YOUR_API_TOKEN" -o inverters.csv
Date;UTC offset;WR 01.01 - AC production per inverter (kWh);WR 01.02 - AC production per inverter (kWh);...
2026-07-01 06:15;+02:00;0,6;0,6;...
- Without a choice, the file carries all inverters, 50 per page.
lane_page=2gives the next 50;lane_limit=100gives 100 per page. - To export certain inverters only, add
components=inverter:1043,inverter:1044. The component dialog on the Metrics tab puts the references into the link for you. - Strings and combiner boxes work the same way, with
string.power(energy per string) andgak.power(energy per combiner box).
Recipe 5: Every Irradiance Sensor
Each sensor on its own, without averaging:
curl --compressed "https://service.mirox.io/api/v1/export/series?park=ABC123DEF456&metrics=sensor.irradiance&window=yesterday&step=15min" \
-H "Authorization: Bearer YOUR_API_TOKEN" -o sensors.csv
sensor.irradiation gives the irradiation per sensor in kWh/m², at every step up to a year. The system template Irradiance Sensors (CAFE1030CAFE) carries both, together with the plant's pyranometer irradiation.
Recipe 6: Wind Turbines
Energy and wind speed of every turbine, per day:
curl --compressed "https://service.mirox.io/api/v1/export/series?park=ABC123DEF456&metrics=turbine.energy_ac,turbine.wind_speed&window=previous_month&step=day" \
-H "Authorization: Bearer YOUR_API_TOKEN" -o turbines.csv
The power of a turbine, turbine.power_ac, is a 15-minute metric: export it with step=15min.
Recipe 7: Battery
Charged and discharged energy and the state of charge of the storage, per day:
curl --compressed "https://service.mirox.io/api/v1/export/series?park=ABC123DEF456&metrics=battery.energy_in_ac,battery.energy_out_ac,battery.soc&window=previous_month&step=day" \
-H "Authorization: Bearer YOUR_API_TOKEN" -o battery.csv
For single containers, racks, modules or cells, use the metrics of those levels, for example battery_box.soc or battery_cell.voltage. A plant has many cells; choose the ones you need in the component dialog.
Excel With Power Query
Power Query reads a link directly, with the token in the Authorization header. The workbook then refreshes with Data ▸ Refresh All.
- In Excel, choose Data ▸ Get Data ▸ From Other Sources ▸ Blank Query.
- Open the Advanced Editor and paste the query below. Replace the plant, the metrics and the token.
- When Excel asks how to connect, choose Anonymous. The token is already in the header; any other choice makes Excel refuse the header.
let
Source = Csv.Document(
Web.Contents(
"https://service.mirox.io",
[
RelativePath = "api/v1/export/series",
Query = [
park = "ABC123DEF456",
metrics = "plant.grid_feedin,plant.rad_pyranometer",
window = "previous_month",
step = "day",
header = "id",
separator_csv = ",",
separator_decimal = "."
],
Headers = [Authorization = "Bearer YOUR_API_TOKEN"]
]
),
[Delimiter = ",", Encoding = 65001, QuoteStyle = QuoteStyle.Csv]
),
Promoted = Table.PromoteHeaders(Source, [PromoteAllScalars = true]),
Typed = Table.TransformColumnTypes(
Promoted,
{
{"timestamp", type date},
{"plant.grid_feedin", type number},
{"plant.rad_pyranometer", type number}
},
"en-US"
)
in
Typed
header=idmakes the column headers stable ids. The query keeps working when a metric is renamed or the language changes.- With
separator_decimal = "."and the culture"en-US", the numbers are read the same way on every computer, whatever its regional settings. - At a step below a day, the column
timestampholds date and time: usetype datetime. The columnutc_offsetis a text. - Empty cells stay empty. They mean "no data", not zero.
- For a template, use
RelativePath = "api/v1/export/series/template/CAFE1000CAFE"and leave outmetrics.
Keep the Token Out of Shared Workbooks
The token is part of the query and travels with the workbook. Create a token of the group Metric Export for this purpose only: it can read exports and nothing else, and you can revoke it without touching your other tokens.
Opening the CSV File in Excel
- Separators: the defaults (
;between columns,,as decimal mark) open directly in an Excel with German regional settings. For English settings addseparator_csv=,&separator_decimal=.— the two must differ. - Dates:
datetime_formattakes a pattern such as%d.%m.%Y %H:%Mif you need another format. - Encoding: the files are UTF-8. If special characters look wrong, import the file with Data ▸ From Text/CSV.
- Column names:
language=de(ores,fr,it,pt) translates them. - Size: large files are compressed on the way when the client accepts it — hence
--compressedin the examples. Browsers and Excel do this by themselves.
Limits
| Limit | Value |
|---|---|
| Metrics per link | 20 |
| Plants per link | 50 |
| Components per metric and page | 50, at most 100 |
| Columns | 400 |
| Values per column | 180 000 — 125 days at 1 minute, five years at 15 minutes |
| Values in total | 1 800 000 |
A link that asks for more is refused with 400 over_budget, and the answer names the step or the range that would fit. How to split a large export is described in the Metric Export API.
Links You Already Use Keep Working
Links of the previous raw data export keep delivering the same columns. Nothing in a workbook that uses them has to change:
https://service.mirox.io/api/v1/export/raw/query?metrics=raw_grid_energy_total&park=ABC123DEF456&start=2026-07-01T00:00:00Z&end=2026-07-08T00:00:00Z&step=15m&value=use_delta
https://service.mirox.io/api/v1/export/raw/query?metrics=raw_grid_energy_total&park=ABC123DEF456,DEF456ABC123&start=2026-07-01T00:00:00Z&end=2026-08-01T00:00:00Z&step=1h&value=use_delta&multi_park_agg=split
https://service.mirox.io/api/v1/export/raw/component/query?metrics=comp_raw_inverter_energy_ac&park=ABC123DEF456&component_type=inverter&start=2026-07-01T00:00:00Z&end=2026-07-08T00:00:00Z&step=15m&value=use_delta
https://service.mirox.io/api/v1/export/raw/component/query?metrics=comp_raw_string_energy&park=ABC123DEF456&component_type=string&components=1084279778457255938&start=2026-07-01T00:00:00Z&end=2026-07-08T00:00:00Z&step=15m&value=use_delta
Their counterparts in the Metric Export are the recipes 1, 3 and 4 above. Three things differ: energy is in kWh instead of Wh, the times are the local time of the plant instead of UTC, and the metrics have the names the reports use. The migration guide lists every previous id with its metric; the previous links are described in the Legacy Export API.
Related Features
- Metric Export — the Data Export page
- Metric Export API — every parameter, limit and error
- External Report Generator — a complete Python example
- API Token Usage — create the token the examples use
- Data Export FAQ