Hi - I've sen some past discussions helping people use the whitepages API in excel, is there anybody around still who knows how to do this? I'm actually a new account executive at Whitepages trying to help one of my customers who wants to write a macro which will go through a list of addresses, and for each one build the url then send it and format the response correctly.
It looks pretty easy to send a static API request and Excel seems to automatically download the schema and format the data. I need help with two things:
1) how do I program into the macro changes in how Excel executes the schema or formats the xml data? I want it to only paste in part of the XML. Specifically I want it to only paste in the lines with something in Column M ("Rank") and only once for each if there are duplicates. If there is a no match found response then it just pasts that field.
2) how do I write a For loop which will allow it to run through a list or url's, send dynamic requests, then append the responses to the list which it's building in the sheet.
Here's the static API call which I got to work with my developers key and I've attached a sample spreadsheet with the API url's already completed.
Sub api()
'
' api Macro
ActiveWorkbook.XmlImport URL:= _
"http://api.whitepages.com/reverse_address/1.0/?house= 98;street=Eagle Rest Road;city=Dahlonega;zip=30533-7017;api_key=<<<<PM me for the key if you want to try>>>>" _
, ImportMap:=Nothing, Overwrite:=False, Destination:=Range("$A$1")
Range("D17").Select
End Sub
I appreciate any advice anyone can give me as I'm trying to get this done without asking for help from our programmers so they can focus on improving the API. Our developers forum has nothing but crickets so I found this place with all the Excel experts. As I go along I expect to have lots of customers who are working with spreadsheets that would love to be able to use a macro to hit our API so I'm trying to learn this. Also, I imagine some of our customers would actually be willing to pay an excel developer to do this so it would be great to build some relationships with you guys!
Thanks in advance!
Eric Farnham, Account Executive Whitepages.com Pro
Bookmarks