1
votes

I want to just get one line from a rest url in google sheets.

When I try

=IMPORTDATA("https://imageryuploader.geoplatform.gov/arcgis/rest/services/ImageEvents/MapServer/1/query?text=A0016-4646&outFields=EXIFPhotoDate")

I get the whole code block for the page

I get NA for =IMPORTHTML("https://imageryuploader.geoplatform.gov/arcgis/rest/services/ImageEvents/MapServer/1/query?text=A0016-4646&outFields=EXIFPhotoDate", "list",1)

If I just put https://imageryuploader.geoplatform.gov/arcgis/rest/services/ImageEvents/MapServer/1/query?text=A0016-4646&outFields=EXIFPhotoDate into a browser I get

records: 2

EXIFPhotoDate: 1506173228000 Point: X: -66.61147999999997 Y: 18.279028333000042

EXIFPhotoDate: 1506173228000 Point: X: -66.61147999999997 Y: 18.279028333000042

I want to create a google sheet where we have

column A -the image name, and in column B it uses =IMPORTHTML("https://imageryuploader.geoplatform.gov/arcgis/rest/services/ImageEvents/MapServer/1/query?text=A0016-4646&outFields=EXIFPhotoDate", "list",1) or something similar and gets the UNIX D/T. Finally, in column C it should put in the dd/mm/yyyy and in D the 24 UTC time.

Thanks to Convert Exif date to different format I have the formula for converting the unix d/t.

If Google Sheets can't do it, happy to use EXCEL or Python 2.7

Sample GSheet is at https://docs.google.com/spreadsheets/d/1Ff-gohRIkumpxqSeEVKyGq6PPEP542PJSB1vBIzI1jA/edit#gid=0

1

1 Answers

1
votes

Have you installed or used the google sheets API?
https://developers.google.com/sheets/api/quickstart/python

There is some sample code provided.

Here is the GitHub link
https://github.com/kurtlocker/sheets-api

Hope it helps.