Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export bug list (or any custom query) from TFS to Excel from a command line?

I need to export list of bugs from our Team Foundation Server to Excel. It's trivial to do it manually, but I need a command line version since the task needs to be automated.

Anyone knows how to do this?

like image 303
durad Avatar asked Jun 30 '11 11:06

durad


1 Answers

  1. To answer your origional question: Add a new query in TFS, create your query and click save. This should give you an option to save the query either on the sever or locally. If you chose to save it locally and then change the extension from WIQL to .txt you will have the query available to you :-)

  2. I hope you are aware that you have the option of using the 'Team' tag in your Excel/Project ribbon. Having said that, you can create a macro in excel that consumes the refresh or publish button on the team ribbon. Have a look at this sample macro http://blogs.msdn.com/b/teams_wit_tools/archive/2007/03/15/how-to-invoke-tfs-add-in-controls-from-macro-code.aspx

HTH.

Cheers, Tarun

like image 106
Tarun Arora Avatar answered Oct 11 '22 10:10

Tarun Arora