LibreOffice GetRest Plugin

Tags: Calc Extensions

last edited: 2022-08-23

Rating:

The extension adds 2 new function to LibreOffice Calc.
Function GET(URL) offer you to get data from the internet by simple get request.
Function PARSEJSON(JSON,PATTERN) returns substructure of JSON
structure getting according to pattern.

libreoffice getrest plugin 1 90ceb5ec 4bd8 4e6d b77f d08ebaf3cdd2

Description

LibreOfficeGetRest plugin is Calc Add-Ins Extension which adds two functions to LibreOffice calc.

Added functions

1) Get

Get function allow user to perform get request to remote server end get data from it.

Syntax: =get(URL) Where URL is URL which to send a GET request.
Value of cell will be result of get request.
Example:
Cell content:
=get("http://api.openweathermap.org/data/2.5/weather?q=London,uk")
Cell value:
{ "coord":{ "lon":-0.13, "lat":51.51 }, "sys":{ "type":1, "id":5091, "message":0.1999, "country":"GB", "sunrise":1413008314, "sunset":1413047741 }, "weather":[ { "id":801, "main":"Clouds", "description":"few clouds", "icon":"02d" } ], "base":"cmc stations", "main":{ "temp":287.3, "pressure":1011, "humidity":62, "temp_min":285.15, "temp_max":289.15 }, "wind":{ "speed":5.1, "deg":230 }, "clouds":{ "all":20 }, "dt":1413046702, "id":2643743, "name":"London", "cod":200 }

 

2) Parse JSON

Parse JSON function allow u to get JSON substructure or direct value from JSON structure
Syntax: =PARSEJSON(JSON,Pattern) Where JSON is valid JSON structure. Pattern is a set of commands to parser splited by dote symbol '.' command.command.command.
There two different commands get(XXX) which return the XXX element of JSON array structure, and objectName command which get the value of json object by its name.
Value of cell will be result of parsing if JSON valid and pattern correct or error message otherwise
Example:
Cell content:
A1=
{

{
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 25,
"height_cm": 167.6,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
},
"phoneNumbers": [ {
"type": "home",
"number": "212 555-1234"
},
{
"type": "office",
"number": "646 555-4567"
} ],
"children": [],
"spouse": null
}

A2: =parsejson(A1,"phoneNumbers.get(1).number")
Cell value:
646 555-4567

Additional documentation: https://github.com/BinnaryWolf/LibreOfficeGetRestPlugin/wiki

Feedback

Post your review

You cannot post reviews until you have logged in. Login Here.

Reviews

  • Giuseppe Gencarelli Sep 19, 2022, 5:55 PM (7 days ago)

    How to get it?

  • Wayne Sexton Jul 9, 2022, 11:16 PM (3 months ago)

    Where is the download links for this extension? They are not showing!

  • Jhani Coetzee Jun 22, 2022, 9:49 PM (3 months ago)

    I finally got it working, but now I get the error: "Failed to set up connection Received fatal alert: protocol_version" if I connect to the Northwind demo service with this url:
    "https://services.odata.org/Northwind/Northwind.svc/Products?$format=json". Anyone know why this is happening?

  • Santiago Botta Jun 20, 2022, 9:28 PM (3 months ago)

    I found it really helpful. Though I'm trying to fetch some data that contain numbers, which I want to use to evaluate calculations. Is there a way to cast string values from requests into numbers? The VALUE functions doesn't seem to work.

  • Thomas Gratier Oct 30, 2021, 8:44 PM (11 months ago)

    Used it a while ago and happy with it. I was unable to download it because bintray now replaced. Using internet archive. If you go to it
    https://web.archive.org/web/*/http://dl.bintray.com/binnarywolf/LibreOfficeGetRestPlugin/LibreOfficeGetRestPlugin.oxt and wait for redirection, you will get the oxt file. I've also hosted a copy on a gist https://gist.github.com/ThomasG77/4ed97370af8355feabf50cb2909198a0

  • Søren Christensen Jul 29, 2021, 4:37 PM (14 months ago)

    There seems to be a zip-file you can extract it from here: https://github.com/arachan/getrest/releases/latest

  • Alex DeLarge Feb 18, 2021, 3:52 AM (20 months ago)

    Download link?

  • shaman TAO Jan 12, 2021, 10:29 AM (21 months ago)

    Hello, where is the download link please ?

  • Michael Karajan Dec 4, 2020, 8:15 AM (22 months ago)

    Excellent plugin. Succeeded to import JSON data from Firefox Bookmarks.
    Then a little bit date conversion: = A1/1000000/(60*60*24) + 25569.
    Then import to my new LO BASE bookmark database.
    Working.

  • John Doe Oct 16, 2020, 4:21 PM (24 months ago)

    This plugin still works. I am using it with version 7.0 w/o any problem and it solves a lot of pain.

    Do not forget to check the radio button for the Java at Tools/Options/LibreOffice/Advanced

    It is still available for download at https://bintray.com/binnarywolf/LibreOfficeGetRestPlugin/LibreOfficeGetRestPlugin/1.0.0/view/files#files/

    • Thankful_User Nov 28, 2020, 1:39 PM (22 months ago)

      Agree, works very well, very useful. Many thanks to the author!

RSS feed for reviews on this page | RSS feed for all reviews