Eurostat Data for Calc 1.0.4
If you installed 1.0.3, please upgrade to this release. 1.0.3 fixed EUROSTATDATA showing up
twice in the Function Wizard, but the fix broke any spreadsheet saved with EUROSTATDATA under
1.0.1 or 1.0.2 — those formulas came back as #NAME? until retyped. This release fixes the
duplicate the right way, without that side effect. 1.0.4 also repairs files broken by 1.0.3 —
just reopen them after installing this version.
What went wrong in 1.0.3
EUROSTATDATA was registered two ways at once: an interface-based mechanism (XAddIn) and a
declarative one (CalcAddIns.xcu, added in 1.0.1). Both exposed the function to Calc
simultaneously, so it listed twice in Insert ▸ Function. 1.0.3 fixed that by deleting the
XAddIn registration and keeping only CalcAddIns.xcu.
That was the wrong half to keep. It turns out the internal address Calc embeds in a saved .ods
file for an add-in formula depends on whether XAddIn is present:
- With
XAddIn(1.0.1, 1.0.2, and now 1.0.4 again): short, stable address —
ORG.LIBREOFFICE.EUROSTAT.ADDIN.EUROSTATADDIN.GETEUROSTATDATA - Without it (1.0.3 only): a longer, raw-implementation-name address —
ORG.LIBREOFFICE.EUROSTAT.ADDIN.EUROSTATADDIN$_EUROSTATADDIN.GETEUROSTATDATA
Any file saved under 1.0.1/1.0.2 has the short address baked into its formulas. Opening it under
1.0.3 — which only recognizes the long address — left every EUROSTATDATA cell showing #NAME?
(Err:525) until manually retyped. This affected the demo sheet in the 1.0.3 release, and would
have affected any real spreadsheet built on an earlier version.
The actual fix
CalcAddIns.xcu turned out to be unnecessary. With XAddIn restored, the function exposes
correctly — verified against a real profile with five other Calc add-ins installed (the exact
"real profile" scenario that CalcAddIns.xcu was added in 1.0.1 to guard against) — and with
CalcAddIns.xcu gone entirely (rather than left in as an empty file), there's only one
registration path again, so the duplicate Function Wizard entry doesn't come back either. Verified
in Calc: single entry, fresh formulas compute correctly, and formulas from a 1.0.1/1.0.2-era file
resolve with no error — no retyping needed.
Net effect: 1.0.4 is functionally equivalent to 1.0.0/1.0.1's registration approach, with the
duplicate-listing bug actually gone rather than traded for a compatibility break.
Install
Download EurostatAddin-1.0.4.oxt below, then either double-click it to open the Extension
Manager, or:
/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.4.oxtIf you have 1.0.3 installed and have spreadsheets showing #NAME? in EUROSTATDATA cells,
installing this version and reopening those files should resolve them without any editing.
Restart Calc after installing.
Usage
=EUROSTATDATA(datasetCode; filters)
datasetCode— a Eurostat dataset code, e.g.nama_10_gdp.filters— optional dimension filters askey=valuepairs separated by;, e.g.
"geo=DE;time=2023;unit=CP_MEUR". Pass""for no filtering. See the
filters cheatsheet
below for syntax, gotchas, reserved parameters, and common dimension keys.
Enter it as an array formula so the whole table spills out: select a range large enough for the
result, type the formula, and confirm with Ctrl+Shift+Enter (recent LibreOffice versions with
dynamic array support will spill automatically from a single cell).
Returns a table: a header row (one column per dimension, plus value), followed by one row per
observation. Errors show as a readable #ERROR: ... cell instead of Err:5xx.
=EUROSTATDATA("nama_10_gdp"; "geo=DE;time=2023;unit=CP_MEUR")
=EUROSTATDATA("une_rt_a"; "geo=FR;time=2023")
=EUROSTATDATA("tec00118"; "geo=DE;sinceTimePeriod=2015")
The last example uses sinceTimePeriod, one of Eurostat's own reserved query parameters (not a
dimension) — useful for pulling a whole year range back in one call. lastTimePeriod works the
same way. Any filter key you pass goes straight into the API query string.
Try it
Download Eurostat-Demo.ods
below — it has several EUROSTATDATA(...) formulas already entered and computed against live
data, so opening it (after installing the add-in above) shows the function working right away.
This is the same file used since 1.0.1 — no data changes, and it's confirmed working under this
release.