Wednesday, 9 September 2015

World Bank XML service and Google Apps Script

Hi guys!

Easy task also for a novice as me in Google scripting, I wrote 200 lines in one day for ripping some data from the World Bank XML API service and presenting it in a Google Sheet.

Here the sheet: https://docs.google.com/spreadsheets/d/1TyI-98fVfl1BsVGM0t6b6V65WysPulW8Z2zUsYTul04

Functions are:
  • onOpen() : creates a menu in Google Sheet for launching the functions
  • average() : average function which supports NULL values, get it here - couldn't find any better on the web
  • loadDataXml(): given an indicator, fetch XML and process in such a way to export it both as a custom function or from a menu command
  • getData(): menu command for loadDataXml()
  • loadIndicatorsXml (): menu command for fetching indicators list as XML in a new sheet

loadDataXml()
Given an indicator, fetch XML and process in such a way to export it both as a custom function or from a menu command
getData()
Menu command for loadDataXml()
loadIndicatorsXml ()
Menu command for fetching indicators list as XML in a new sheet
onOpen()
 Creates a menu in Google Sheet for launching the functions

No comments:

Post a Comment