##What Is It?
A Rally REST toolkit written for Microsoft Visual Basic for Applications (VBA). VBA is a scripting language used by Microsoft Office (and other) applications.
##Why? Why not? VBA is a useful toolkit for automating processes in Microsoft Excel, for one. The Rally Excel Plugin, while providing a nice UI-based interface for querying Rally, does not offer script-ability or automation.
##Why Not? Excellent question. VBA may be quite slow and inefficient for accessing large amounts of data. It's not asynchronous, and can be a clumsy way to get data into/out of Rally in large volumes. But for small datasets, it could be convenient.
##How functional is this toolkit at this point in time? Alpha-level code. Right now this is basically a proof-of-concept for Querying Rally and Creating/Updating Rally Artifacts from VBA code. More to come though!
Note: You'll need to follow ALL of the steps below before trying any of the example code.
-
Download the RallyRestToolkitForVBA.xlsm Excel Worksheet
-
Enable Macros (Enable Content)
- Show the Developer Tools Menu in Excel
- File -> Options ->
- Customize Ribbon -> Developer "Checked"
- Open Visual Basic Editor
- Go to Tools -> References
- The References shown here are needed to use the RallyRestToolkitForVBA. Add/load any that are not checked on in your environment.
Video showing Sample Query from Worksheet (illustrating code in GetStoriesForm).
The core functionality is contained in the Class Modules that are accessible from the VBA Editor for the Excel Worksheet:
The code behind the "Get Stories" button in the worksheet is contained within the "GetStoriesForm" module. There's some UI logic there, but the useful stuff around how to instantiate and use the RallyRestToolkitForVBA toolkit is in the QueryStories function:
There is an example showing how to use the RallyRestToolkitForVBA toolkit to Create Defects. The data and upload button are on the "CreateDefects" Worksheet.
The code that accomplishes the upload is found within the "UploadDefectsForm" module.
There's an example data and button for Updating Defects present on the "UpdateDefects" Worksheet Tab:
The code that accomplishes the updating is found within the "UpdateDefectsForm" Module:
There's plenty still to do with this to make this toolkit robust. Overall, error-checking and handling needs to be a lot more thorough everywhere. There are probably a number of situations where text that resides within Excel cells will require more complete encoding and escaping before uploading to Rally, in order to get things to work right. This is alpha-level code...so just be aware.
Unfortunately, No. The MSXML2 module that VBA uses for the HTTP connection is not available on the Mac.