open All Channels
seplocked EVE Technology Lab
blankseplocked excel querytable API syntax
 
This thread is older than 90 days and has been locked due to inactivity.


 
Author Topic

Amrann
Posted - 2011.04.07 03:32:00 - [1]
 

Apologies if this is a painfully obvious question, but I'm trying to use Excel querytables and VBA to do some basic API calls and am stuck on syntax. If anyone has done this successfully and recalls the code, I'd be very grateful for an assist.

I've got the following:

'WS' is an excel worksheet
Dim qryStr as string, postStr as string

qryStr = "URL;http://apitest.eveonline.com/account/Characters.xml.aspx"
postStr = "userID=someID&apiKey=someAPI"

'someID and someAPI are legit values in the actual code

With WS.QueryTables.Add(Connection:=qryStr, Destination:=Range("A1"))
.PostText = postStr
.RefreshStyle = xlOverwriteCells
.SaveData = True
.Refresh
End With

The returned data says that 'the parameter userID is required for validation', so it doesn't like the .posttext. Not sure why.

Thanks much for any assistance.

Garheade
Amarr
Aideron Robotics
Posted - 2011.04.12 13:50:00 - [2]
 

Your missing the "?" in your join.

Try it this way:

qryStr = "URL;http://apitest.eveonline.com/account/Characters.xml.aspx"
postStr = "?userID=someID&apiKey=someAPI"


 

This thread is older than 90 days and has been locked due to inactivity.


 


The new forums are live

Please adjust your bookmarks to https://forums.eveonline.com

These forums are archived and read-only