September 24, 2009
Querying TestTrack and Surround SCM Data From Excel
In my last post, SQL Is Still Your Friend, I wrote about using SQL to query TestTrack data. As a continuation of that thought, I wanted to bring a query tool to your attention: Microsoft Excel. There are plenty of alternatives to using Excel for queries but it has two major advantages: 1) almost everyone uses MS Office so your spreadsheet is portable and 2) after you retrieve the data from the database, you can use the extensive library of Excel functions to work with the data. Here's the process I use to query TestTrack data into MS Excel 2007 (other methods are possible and these steps may change if you are using a different version of Excel):Email sign up
- Unless you are using SQL Server as a database program, you will need to create an ODBC connection for your database.
- From a new spreadsheet, select the Data tab and from the ribbon, select From Other Sources -> From Microsoft Query (Microsoft Query is a tool usually installed with Excel). Select your TestTrack database connection.
- In Microsoft Query, you can build a query by adding tables and linking fields but I find that the complexity of the TestTrack database makes this a long process. Instead, I prefer the View -> SQL option so I can type or paste SQL queries. When the query is complete, save the query then select File -> Return data to Microsoft Excel.
- Excel will prompt you for how to manage the data and what cell to use as the upper left corner cell for the results. I use the option Table and put the data into cell B2.
- Unfortunately, column headers will have to be relabeled but everything else is returned as it is in TestTrack.