Import JSON data into Google Sheets

前端 未结 4 1421
北荒
北荒 2021-01-30 05:50

I am pulling data from a web service and it is formatted as JSON. I am writing a Google Apps Script for Google Sheets that will populate the data for me. My problem is, I can\'t

4条回答
  •  渐次进展
    2021-01-30 05:58

    A 2013 update -- Check out the ImportJSON library at

    http://blog.fastfedora.com/projects/import-json

    "ImportJSON imports data from public JSON APIs into Google Spreadsheets. It aims to operate similarly to how the native Google Spreadsheet functions ImportData and ImportXML work."

    Code available here and he has submitted it to the Script Gallery: https://raw.github.com/fastfedora/google-docs/master/scripts/ImportJSON/Code.gs

    Example usage: After putting the code in your Google spreadsheet's Script Editor, then paste this in cell A1 of the sheet:

    =ImportJSON("http://gdata.youtube.com/feeds/api/standardfeeds/most_popular?v=2&alt=json", "/feed/entry/title,/feed/entry/content",               "noInherit,noTruncate,rawHeaders")
    

提交回复
热议问题