Excel + Web

An Excel eBay Sold Prices Search Tool

I wanted to buy a Blackberry for work, my company don’t provide me with one, preferring smoke signals instead ;-). Obviously I didn’t want to pay top dollar for it so it was off to eBay in search of a bargain. I noticed there was a large spread of prices for the same phone, which lead me to wonder if I could research the sold prices for various items.

It turns out that you can’t via eBay, but some other company does provide an API (with a free option) which can be used to search the sold prices.   Long story short here is a file that you can use to get the prices. You’ll need to get a developers key first though, at:

https://developer.ebay.com/join/Default.aspx

Mine took a day to come through….

“User Guide…”

Get your AppID key and paste it in the “eBay developers App ID” box, then type something in the keyword box, then pick a currency then and parent category, then a child one. Click search!. If you can’t find anything in this category, try a slightly different set of keywords, of check the “search all” box, to search the all the listings.

The “update category data” link under the child category drop down updates the data in the category dropdowns as eBay change them form time to time.

Note on quality….

Over all I’m a bit disappointed by the whole thing. As I’ve thought about it, while writing the app, it’s dawned on me that it’s quite a tricky thing to do. You see the problem is, eBay gets hammered by people selling links to things, or multiply items, or broken things, or replicas, or mis-listings (something listed as “Oakley sunglass, but when you read the detail it says there not actually Oakley’s but they look like them etc), so getting a true average price is actually quite hard… I’m not sure I trust the results. As the API does not return a list of all the items that go into the average price you can’t eye ball the data. But it’s better than nothing I guess.

Download the workbook here:

EditGrid: Excel Plus public beta.

EditGrid is one of the better on-line spreadsheets. I’ve not used it much but took a quick look today. I was impressed with what I saw and interestingly they have cleverly made working with Excel and EditGrid easy with there addin:
Take a look here
This, I would think is a key factor, dont try to replace Excel (yet), but work with it!

Geocoding in Excel using Google Maps API

Heres a little example of some VBA functions I put together to get geocodes into excel using the google maps API.
It’s not the best geocoder in the world, but it does ok in the test I’ve done so far, although it does just come up with blanks for some locations. To use it you will need a Google maps API key which you need to store in a text file on the same path as the workbook, details are on the first sheet of the workbook.

geocopic.png

As for the code itself I had to automate IE rather than use an API or the HTTP or XMLHTTP libraries, as my corporate firewall would not allow access using these. The function only asks for 1 string, so you have to add spaces yourself, this might be done better, but it suited my needs (that is to say, I didn’t bother writing in optional arguments etc.)

It’s worth while looking at the code as I have done a few things that might not be considered “best practice”, mainly not closing the IE application when the function has run – this is to speed up the function – there is a public function that you can use to close it from a worksheet if you wish (see code as it’s not explained in the “documentation”)

Theres probably some other stuff that I should mention, but I did this a week or so ago and have not been able to post it as my internet connection was down, so I have forgotten that!

Feel free to post any questions and I’ll feel free not to answer them!!!!

Enjoy
Ross

Download M.I.E Google Maps Geocoding Example (zip)