(received and added automatically via TwitterAuthenticator) Set QueryTwitter = TwitterClient.With the release of Microsoft Office 2011 for Mac, VBA made a welcome return to the Apple platform.Īlas, though the VBA implementation in Microsoft Office 2011 closely mirrors the implementation found on the Windows platform, none of the many features that are provided through COM and ActiveX on the Windows platform made the journey across. The TwitterAuthenticator (found in the authenticators/ folder) uses Twitter's OAuth 1.0a authentication and details of how it was created can be found in the Wiki.įunction QueryTwitter(Query As String ) As WebResponse Dim TwitterClient As New WebClient TwitterClient.BaseUrl = "" ' Setup authenticator Dim TwitterAuth As New TwitterAuthenticator TwitterAuth.Setup _ ConsumerKey:= "Your consumer key", _ ConsumerSecret:= "Your consumer secret" Set TwitterClient.Authenticator = TwitterAuth ' Setup query request Dim Request As New WebRequest Request.Resource = "search/tweets.json" Request.Format = WebFormat.Json Request.Method = WebMethod.HttpGet Request.AddQuerystringParam "q", Query Request.AddQuerystringParam "lang", "en" Request.AddQuerystringParam "count", 20 ' => GET ' Authorization Bearer Token. The following example demonstrates using an authenticator with VBA-Web to query Twitter.
Support for custom request and response formats.For proxy environments, Client.EnabledAutoProxy = True will automatically load proxy settings.Authentication support is built-in, with suppory for HTTP Basic, OAuth 1.0, OAuth 2.0, Windows, Digest, Google, and more.XML support is still possible on Windows, follow these instructions to use a custom formatter.
#EXCEL VBA ON MAC FOR MAC#
Note: XML support has been temporarily removed from VBA-Web while parser issues for Mac are resolved.
#EXCEL VBA ON MAC UPGRADE#
To upgrade from Excel-REST to VBA-Web, follow the Upgrading Guide To start from scratch in Excel, VBA-Web - Blank.xlsm has everything setup and ready to go.To install/upgrade in an existing file, use VBA-Web - Installer.xlsm.It includes support for authentication, automatically converting and parsing JSON, working with cookies and headers, and much more. VBA-Web (formerly Excel-REST) makes working with complex webservices and APIs easy with VBA on Windows and Mac.