Weather Information into Excel using Openweather API Filterxml Webservice

antfield

New Member
Joined
Mar 28, 2006
Messages
33
hi

Need help with the following; it is clearly beyond me !

I have an API for openweather.org

I can Paste the API info into a Browser and get a response back that looks like this;

Webinfo

{"cod":"200","message":0.1607,"cnt":39,"list":[{"dt":1498705200,"main":{"temp":288.19,"temp_min":286.354,"temp_max":288.19,"pressure":1011.62,"sea_level":1033.45,"grnd_level":1011.62,"humidity":78,"temp_kf":1.83},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":32},"wind":{"speed":1.56,"deg":251.5},"rain":{},"sys":{"pod":"d"},"dt_txt":"2017-06-29 03:00:00"},{"dt":1498716000,"main":{"temp":287.01,"temp_min":285.784,"temp_max":287.01,"pressure":1010.91,"sea_level":1032.71,"grnd_level":1010.91,"humidity":80,"temp_kf":1.22},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.21,"deg":258.501},"rain":{},"sys":{"pod":"d"},"dt_txt":"2017-06-29 06:00:00"},{"dt":1498726800,"main":{"temp":283.73,"temp_min":283.123,"temp_max":283.73,"pressure":1011.99,"sea_level":1033.88,"grnd_level":1011.99,"humidity":85,"temp_kf":0.61},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":3.31,"deg":269.502},"rain":{},"sys":{"pod":"n"},"dt_txt":"2017-06-29 09:00:00"},{"dt":1498737600,"main": etc etc

in Excel I have B1=API Key B2=Location C4=WEBSERVICE("http://api.openweathermap.org/data/2.5/forecast?id="&LOCATION&"&APPID="&API)

Which displays the information as seen below Webinfo

I have googled and and found that I need to use the filterxml to filter what info I want to display ( which is where I have the problem )

I can not work it out.

Basics are I want to lookup a cell that contains a Date i.e Cell A10 has a date of 28/06/2017 and return the temp from the filterxml for that day.

I found that the date data is listed as " dt " which is utc time so I have worked out that to convert this to date format I needed to (( example I have 1498694400 in cell O13 ))
=(((O13/60)/60)/24)+DATE(1970,1,1) which then allows me to see the normal date format 29/06/2017

Ideally I will have a spreadsheet with information running down the page with dates I am after a way to display the temp for the given date.

HELP :)

Anthony
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top