Documentation
EnergyData Iberia Excel Add-in — 25 custom functions, 275+ metrics.
Install the add-in
Excel Web, Desktop (Win + Mac).
Concepts
Zones, timezone, agg codes, capture methods, DST.
Function reference
25 functions, full per-function pages.
Metrics catalog
275 metrics with unit, source, range.
Changelog
Add-in version history & breaking changes.
Quick start
=ED.OMIE()— Latest spot price=ED.OMIE.RANGE("2025-01-01",, 3)— Monthly prices=ED.CAPTURE(1, "2025-07-01")— Solar capture price (EUR/MWh)=ED.CAPTURE(1, "2025-07-01", , "pct")— Solar capture rate (%, gen-weighted)=ED.CURTAIL.RANGE("vre", "economic", "2026-01-01",, 7, "pct")— VRE economic curtailment, total %=ED.PCT.AT.PRICE("gen_solar_pv", 0, "lte", "dayahead", "2026-01-01", "2026-04-30")— % solar at price ≤ 0 EUR/MWh=ED.GET("brent")— Brent crude=ED.METRICS()— List every metricZones
Pass the zone argument to switch markets. Default "ES" when not provided. Coverage varies — check the metrics catalog for each metric × zone availability.
Aggregation codes
| Code | Meaning | Output |
|---|---|---|
| 0 / "5min" / "10min" / "15min" | Native / sub-hourly | 5–96 rows/day depending on metric |
| 1 | Hourly | 24 rows/day (25 on fall-DST day) |
| 2 | Daily (default) | 1 row/day |
| 3 | Monthly | 1 row/month |
| 4 | Quarterly | 1 row/quarter |
| 5 | Semiannual | 1 row/semester |
| 6 | Annual | 1 row/year |
| 7 | Total | Single value over the whole period |
⚡ MW power vs MWh energy
Generation, demand, balancing-band capacity and cross-border flows are stored in MW — instantaneous power. When you aggregate (e.g. agg=6 for annual) the API returns the average MW over the bucket, not the total energy delivered.
In numbers: =ED.GEN.RANGE(1, "2025-01-01", "2025-12-31", 6) may return ~3,500— that's the average power, not 3.5 GWh. The total energy is roughly 3,500 × 8,760 ≈ 30.7 TWh.
Pass unit="MWh"to convert. The conversion uses each metric's native sample interval (5 min for ESIOS Spain gen/demand, 15 min for balancing, 60 min for ENTSO-E zones), so the result is exact down to the sample:
=ED.GEN.RANGE(1, "2025-01-01", "2025-12-31", 6)— Solar PV avg power (MW)=ED.GEN.RANGE(1, "2025-01-01", "2025-12-31", 6, , , , "MWh")— Solar PV total energy (MWh)=ED.RANGE("demand_real", "2025-01-01",, 6, , , , , , "MWh")— Annual demand in MWh=ED.RANGE("gen_total", "2025-01-01", "2025-12-31", 6, , , , , , "MWh")— Annual generation 2025 (all techs, MWh)=ED.RANGE("gen_total_measured", "2025-01-01", "2025-12-31", 6)— Same total but from REE official measured series (no MWh flag — already energy)=ED.RANGE("gen_renewable", "2025-01-01", "2025-12-31", 6, , , , , , "MWh")— Annual renewable generation (MWh)=ED.UNIT.RANGE("VAN2", "2025-01-01",, 6, , , "MWh")— Vandellós II annual energy delivered (MWh) — per-unitAvailable on ED.GEN.RANGE, ED.RANGE, ED.UNIT and ED.UNIT.RANGE since v7.1.13. Virtual aggregates (gen_total, gen_renewable, gen_thermal, gen_fossil) sum the per-tech series at each native timestamp — same MW/MWh logic. Calling unit="MWh" on a price metric (EUR/MWh) returns a 400 error. Already-MWh metrics (gen_total_measured, afrr_energy_up, etc.) auto-aggregate with SUM — no flag needed.
T.Real vs Medida: gen_total is built from real-time per-tech indicators (immediate, ~1-2% off vs official). gen_total_measuredis REE's post-settlement official number (ESIOS id 10043, sum of 47 provinces — ~2-3 day lag, matches REE's published reports).
Shared parameters
These show up across multiple functions with consistent semantics.
tz0/"madrid" (default) | 1/"cet" | 2/"utc"How to interpret the date/hour/minute argument and how to bucket range output. Madrid is DST-aware (24-25 hour days). CET is fixed UTC+1, no DST → 8760 hourly buckets/year. UTC is fixed offset 0.
noDate0 (default, include) | 1 (omit)On *.RANGE functions: whether to include the date/period column in the spill array. Useful when you already have your own time index.
method0/"real" (default) | 1/"pbf"ED.CAPTURE / ED.CAPTURE.RANGE only. realized = dayahead × metered generation (matches what publications report). PBF = dayahead × ex-ante OMIE schedule (Spain only, available before realized data). Since v8.0.0 the param sits after `unit` — pass an empty slot for `unit` if you want PBF (e.g. `=ED.CAPTURE(1, date, "ES", , 1)`).
unit"" (default) | "MW" | "MWh" | "pct" | "hours"Output unit. On gen/demand functions: "MW" (default) vs "MWh" (energy delivered in each bucket). On ED.CAPTURE / ED.CAPTURE.RANGE (since v8.0.0): default returns EUR/MWh, "pct" returns the capture rate (%). On ED.PCT.AT.PRICE: "pct" (default) | "mwh" | "hours".
Functions
Click a function for the full reference. Or browse all on a single page.
Prices
Wholesale day-ahead spot prices.Generation
Power generation by technology and per production unit.ED.GENPower generation by technology (MW) — single value.
ED.GEN.RANGEGeneration time series by technology — average power (MW) or total energy (MWh).
ED.UNITGeneration per Spanish production unit — average power (MW) or total energy (MWh).
ED.UNIT.RANGEGeneration time series for one production unit — average power (MW) or total energy (MWh).
ED.PROGRAMESIOS scheduling programs (PBF/PVP/PHFC/P48) by tech — mix matrix or single series.
Capture price
Production-weighted average price per technology.Battery (BESS)
Optimal battery spread between cheap and expensive hours.Installed capacity
Capacity stock (MW) by tech and region.Registry
Production-unit and owner directory (REE + ENTSO-E).Settlement
OMIE wholesale settlement and government PPA auction awards.Grid access
REE grid-access capacity (PDF history + portal snapshot).Generic + metrics
Single-value, range, and the metric catalog.ED.GETGeneric single-value access for any of 120+ metrics.
ED.RANGEGeneric time-series access for any of 120+ metrics — average value or total energy.
ED.PCT.AT.PRICEShare of a volume metric whose hours fall on one side of a price threshold.
ED.METRICSList every metric exposed by the API with its unit and description.
275+ metrics available
Spot prices, generation, capture prices, futures, commodities, balancing, redispatch, and more.
View live data coverage →