|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
How to: Connect a Work Item List to a Work Item Query
When you work with work items in Microsoft Excel, the type of work item list you select affects how the work item list is refreshed from the work item database:
Query list When you create a query list, refreshing the work item list updates both what work items are in the list, and the information for the work items. In the work item list header, under Query, query lists contain the name of the query to which they are connected.
Input list When you create an input list, refreshing the work item list updates only the information for the work items already in the list. In the work item list header, under Query, input lists contain [none].
When you change from an input list to a query list, the work items that you have added to the list are replaced with the work items that match the query.
To perform these procedures, you must be a member of the Readers group or have the View work items in this node permission set to Allow. For more information, see.
To create a query list
In Team Explorer, find or create the query that returns the work items that you want in your work item list.
In Team Explorer, right-click the query name, and then click Open in Microsoft Excel.
Microsoft Excel opens a new work item list that uses the results of the query. When you update this query list, the work items included will change if the query results have changed.
If you want to, you can add the document to Team Explorer. For more information, see.
Save the Microsoft Excel file.
To create an input list
Open the same Microsoft Excel file that you created in the previous procedure.
Select a cell in the work item list.
On the Team menu, select Configure List.
In Microsoft Office Excel 2007, the Team menu is located on the Add-Ins tab on the ribbon.
Select Refresh current work items only.
Click Apply. The query header will indicate that there is no query associated with this work item list.