Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6151685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:48:13+00:00 2026-05-23T19:48:13+00:00

I have a Excel spreadsheet of requirements created from ReqPro that I need to

  • 0

I have a Excel spreadsheet of requirements created from ReqPro that I need to import into TFS. Each requirement has a linked-from and linked-to field, both of which can contain more than one entry. Since the link relationship is many to many it requires that the direct-link type be used (not parent-child). I thought I would be able to import this using Excel 2010, however when opening a query using direct-links in Excel the results are flat and contain no linkage information. I have over 10,000 of these requirements to import with thousands of links so I need to automate this. Is there an easy way to import many-to-many direct-links into TFS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:48:14+00:00Added an answer on May 23, 2026 at 7:48 pm

    Sorry to say that this is by design, see this bug raised at microsoft connect http://connect.microsoft.com/VisualStudio/feedback/details/667973/tfs-2010-work-items-with-direct-links-query-goes-to-excel-as-a-flat-list#.

    However, there seems to be several work arounds,

    1. If viewing the query results is all that’s needed, you can e-mail or view as a report the results from the Sharepoint portal. (Since this is apparently “by design”, can anyone say inconsistent design?)

    2. If editing the results is desired, perhaps you can make the query a “Tree of Work Items”-type query.

    3. Use the TFS SDK to make the Excel document properly. I did some investigation with this and it’s do-able, but since we only needed viewing, #1 sufficed. Making the generated document editable may take some time.

    PS – I can confirm that i have tried exporting a Tree of Work Items to excel and it keeps the link structure in tact. Also, see this MSDN article on how to do this http://msdn.microsoft.com/en-us/library/dd286627.aspx

    But if you wanted to you could use the TFS API, i am adding some psudo code below,
    1. Use the Open XML SDK 2.0 for Microsoft Office to connect to the large excel and read through it http://msdn.microsoft.com/en-us/library/gg575571.aspx
    2. Use the TFS API to create work items programmatically
    3. Create links between the work items http://blogs.microsoft.co.il/blogs/shair/archive/2010/02/27/tfs-api-part-22-create-link-between-work-item-parent-child-etc.aspx

    private void ReadInformationFromExcelAndCreateLinkWorkItems()
        {
            using (SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Open(@"FilePath\fileName", false))
            {
                WorkbookPart workbookPart = spreadsheetDocument.WorkbookPart;
                WorksheetPart worksheetPart = workbookPart.WorksheetParts.First();
                SheetData sheetData = worksheetPart.Worksheet.Elements<SheetData>().First();
                string text;
                int WorkItemId = 0;
                foreach (Row r in sheetData.Elements<Row>())
                {
                    foreach (Cell c in r.Elements<Cell>())
                    {
                        // Loop through each row till you complete one logical block of work item Links.
                        var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("TfsUrl"));
                        var wiStore = tfs.GetService<WorkItemStore>();
    
                        WorkItem wi = new WorkItem(new WorkItemType // Create a new work item of the type as in your excel)
                        // associate all column cell values to the work item
                        wi.Save(); 
                        // This should give you an ID now
                        WorkItemId = wi.Id;
    
                    }
                }
            }
        }
    

    HTH
    Cheers, Tarun

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Excel spreadsheet containing a list of strings. Each string is made
Our users have created MS-Excel spreadsheets which over time have evolved into fairly complex
I have an excel spreadsheet in a format similar to the following... | NAME
I have an Excel Spreadsheet like this id | data for id | more
I have an Excel spreadsheet with 1 column, 700 rows. I care about every
I have an Excel spreadsheet with a few thousand entries in it. I want
I have an Excel spreadsheet of data like: ColumnA ColumnB 33 11 25 5
I have around 25 worksheets in my workbook (Excel spreadsheet). Is there a way
I have Excel add-in which I add so many class modules that it is
We have an Excel 2002/XP based application that interacts with SQL 2000/5 to process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.