Skip to content

Releases: davidjayjackson/java_eurostats

v1.0.7

Choose a tag to compare

@davidjayjackson davidjayjackson released this 18 Jul 01:40

Refreshed the extension icon (new logo). No functional code changes since v1.0.6.

Install

Grab EurostatAddin-1.0.7.oxt below and double-click it to open in the LibreOffice Extension Manager, or:

/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.7.oxt

Restart Calc if it was open. The EUROSTATDATA function appears under the Eurostat category in the Function Wizard.

Eurostat Data for Calc 1.0.6

Choose a tag to compare

@davidjayjackson davidjayjackson released this 14 Jul 01:29

Adds a custom icon to the extension package, shown in the LibreOffice extension manager. No functional changes to the add-in itself — EurostatAddin-1.0.6.oxt behaves identically to 1.0.5.

Install

Download EurostatAddin-1.0.6.oxt below, then either double-click it to open the Extension
Manager, or:

/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.6.oxt

Usage

=EUROSTATDATA(datasetCode; filters)
  • datasetCode — a Eurostat dataset code, e.g. nama_10_gdp.
  • filters — optional dimension filters as key=value pairs 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.
Same file used since 1.0.1, confirmed working under this release.

Eurostat Data for Calc 1.0.5

Choose a tag to compare

@davidjayjackson davidjayjackson released this 09 Jul 23:13

Docs-only release: adds an MIT LICENSE
file, which was missing from every prior release. No functional changes to the add-in itself —
EurostatAddin-1.0.5.oxt behaves identically to 1.0.4.

Install

Download EurostatAddin-1.0.5.oxt below, then either double-click it to open the Extension
Manager, or:

/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.5.oxt

Usage

=EUROSTATDATA(datasetCode; filters)
  • datasetCode — a Eurostat dataset code, e.g. nama_10_gdp.
  • filters — optional dimension filters as key=value pairs 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.
Same file used since 1.0.1, confirmed working under this release.

Eurostat Data for Calc 1.0.4

Choose a tag to compare

@davidjayjackson davidjayjackson released this 09 Jul 23:07

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.oxt

If 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 as key=value pairs 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.

Eurostat Data for Calc 1.0.3

Choose a tag to compare

@davidjayjackson davidjayjackson released this 09 Jul 22:26

⚠️ Superseded — do not install. This release breaks any spreadsheet saved with EUROSTATDATA under 1.0.1/1.0.2 (formulas show #NAME? until retyped). Use v1.0.4 instead, which fixes the duplicate-listing bug below correctly and also repairs files broken by this release.

Patch release. Fixes EUROSTATDATA showing up twice in the Function Wizard.

  • Duplicate function listing: the function was registered through two mechanisms at once —
    the interface-based XAddIn implementation in EurostatAddin.java, and the declarative
    packaging/CalcAddIns.xcu added in 1.0.1 to fix a different registration problem. Both were
    exposing EUROSTATDATA to Calc simultaneously, so it appeared twice under Add-in in
    Insert ▸ Function. Removed the now-redundant XAddIn/XLocalizable methods from the Java
    class, leaving CalcAddIns.xcu as the single source of registration.
  • New: filters cheatsheeteurostat-filter-cheatsheet.pdf
    below is a 3-page quick reference for the filters argument: syntax, the one-value-per-key
    gotcha, Eurostat's reserved query parameters (sinceTimePeriod, lastTimePeriod, lang,
    precision, geoLevel), and commonly-seen dimension keys (geo, time, unit, sex, age,
    and more). Also linked from the README.

Install

Download EurostatAddin-1.0.3.oxt below, then either double-click it to open the Extension
Manager, or:

/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.3.oxt

If you have an older version installed, restart Calc after installing so the Function Wizard
picks up the corrected registration.

Usage

=EUROSTATDATA(datasetCode; filters)
  • datasetCode — a Eurostat dataset code, e.g. nama_10_gdp.
  • filters — optional dimension filters as key=value pairs 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 demo file as 1.0.1/1.0.2 — no data changes in this release.

Eurostat Data for Calc 1.0.2

Choose a tag to compare

@davidjayjackson davidjayjackson released this 08 Jul 22:41

Docs-only release — no functional changes to the add-in itself. EurostatAddin-1.0.2.oxt is
byte-for-byte the same code as 1.0.1, just re-versioned to match this tag.

The README's Usage section now includes the sinceTimePeriod example and tec00118 (yearly
HICP inflation) dataset entry that were already documented in the
v1.0.1 release notes
but missing from the README itself.

Install

Download EurostatAddin-1.0.2.oxt below, then either double-click it to open the Extension
Manager, or:

/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.2.oxt

Usage

=EUROSTATDATA(datasetCode; filters)
  • datasetCode — a Eurostat dataset code, e.g. nama_10_gdp.
  • filters — optional dimension filters as key=value pairs 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.

Filters cheatsheet

Download eurostat-filter-cheatsheet.pdf
below — a 3-page quick reference for the filters argument: syntax, the one-value-per-key
gotcha, Eurostat's reserved query parameters (sinceTimePeriod, lastTimePeriod, lang,
precision, geoLevel), and commonly-seen dimension keys (geo, time, unit, sex, age,
and more).

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.

Eurostat Data for Calc 1.0.1

Choose a tag to compare

@davidjayjackson davidjayjackson released this 08 Jul 22:32

Patch release. Fixes two bugs found while validating 1.0.0 against a real profile with other
installed add-ins:

  • Add-in registration: added packaging/CalcAddIns.xcu, the same mechanism this user's other
    Calc add-ins (FRED, StockPicker, MOVAVG, LIST) use to register their function names. The
    interface-based XAddIn registration alone wasn't reliably exposing EUROSTATDATA to the
    formula parser once other extensions were also installed.
  • Demo sheet: Eurostat-Demo.ods's
    generator was auto-fitting column A to the instructional sentence in A2, blowing it out to 11+
    inches wide and pushing every data column off-screen. The underlying data was always correct —
    this was a display-only bug.

Install

Download EurostatAddin-1.0.1.oxt below, then either double-click it to open the Extension
Manager, or:

/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.1.oxt

Restart Calc if it was already open. The function then appears under the Eurostat category
in the Function Wizard.

Usage

=EUROSTATDATA(datasetCode; filters)
  • datasetCode — a Eurostat dataset code, e.g. nama_10_gdp.
  • filters — optional dimension filters as key=value pairs separated by ;, e.g.
    "geo=DE;time=2023;unit=CP_MEUR". Pass "" for no filtering.

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.

Examples

=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.

Common dataset codes

Code Description
nama_10_gdp GDP and main components
une_rt_a Unemployment rate (annual)
demo_pjan Population on 1 January
prc_hicp_manr HICP inflation (annual rate, monthly)
tec00114 Real GDP growth rate
tec00118 HICP inflation (annual rate, yearly)

Browse the full catalogue at the Eurostat Data Browser.

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.

Notes

  • Pure Java 8, zero external dependencies (hand-rolled JSON parser, HttpURLConnection) — built
    entirely with the LibreOffice SDK's own toolchain, no Maven required. See build.sh to build
    from source.
  • Registers via CalcAddIns.xcu, the same mechanism LibreOffice's own extension ecosystem uses.

Eurostat Data for Calc 1.0.0

Choose a tag to compare

@davidjayjackson davidjayjackson released this 08 Jul 22:24

LibreOffice Calc add-in that adds a EUROSTATDATA() spreadsheet function for pulling data
straight from the Eurostat REST API (JSON-stat 2.0) into a
sheet.

=EUROSTATDATA("nama_10_gdp"; "geo=DE;time=2023;unit=CP_MEUR")

returns a table that spills into the sheet: 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.

Install

Download EurostatAddin-1.0.0.oxt below, then either double-click it to open the Extension
Manager, or:

/path/to/libreoffice/program/unopkg add EurostatAddin-1.0.0.oxt

Try it

Eurostat-Demo.ods (also attached) has several EUROSTATDATA(...) formulas already entered
and computed against live data — open it after installing the add-in to see it working.

Notes

  • Pure Java 8, zero external dependencies (hand-rolled JSON parser, HttpURLConnection) — built
    entirely with the LibreOffice SDK's own toolchain, no Maven required. See build.sh to build
    from source.
  • Registers via CalcAddIns.xcu, the same mechanism LibreOffice's own extension ecosystem uses.