You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询:能否将含链接、子项、附件的Azure DevOps工作项导出至Excel?

Absolutely, you can export all your Azure DevOps work item data—including links, child items, attachments, and more—to Excel, though the approach depends on how much detail you need and whether you want automation. Here are the most reliable methods:

1. Built-in Azure DevOps Export to Excel (Quick & Simple)

This is the easiest way for most users, and it works directly from Azure DevOps:

  • Go to your project's Boards > Queries and create a query that includes all the work items you need. For child items, use a Tree query to include parent-child hierarchies.
  • Run the query, then click the Export to Excel button in the top menu.
  • In the export options, make sure to select all relevant fields:
    • For links: Add columns like Related Work Items or specific link types (e.g., "Parent", "Child").
    • For attachments: Include the Attachments column (this will show attachment names/links, not the actual files).
  • Once exported, you can format the Excel sheet to highlight hierarchies (e.g., indent child items) or add filters.

Important note: Excel can’t embed actual attachment files—you’ll need to download attachments separately from Azure DevOps (via the work item details page) and link to their local paths in Excel if needed.

2. Power Query for Customized, Refreshable Exports

If you need more control over the data structure or want to refresh the export automatically later, use Excel’s Power Query:

  • Open Excel, go to the Data tab > Get Data > From Azure DevOps (or search for it in the "From Other Sources" menu).
  • Enter your Azure DevOps organization URL and project name, then authenticate.
  • Select the work items you want to import, then load the data into the Power Query Editor.
  • In the editor, you can:
    • Expand the Relations column to extract parent/child links and other related work item details.
    • Add a custom column to pull attachment URLs or metadata using Azure DevOps REST API endpoints.
    • Clean up and format the data (e.g., split link types, organize hierarchies).
  • Load the transformed data into Excel—you can then refresh it anytime to get the latest work item updates.
3. REST API + Scripting for Full Control (Advanced)

For complete customization (like bulk downloading attachments alongside work item data), use the Azure DevOps REST API with a script (PowerShell, Python, etc.):

  • First, generate a personal access token (PAT) in Azure DevOps with Work Items Read and Attachments Read permissions.
  • Use the API endpoint https://dev.azure.com/{organization}/{project}/_apis/wit/workitems?ids={comma-separated-ids}&$expand=All to fetch all work item details, including relations, attachments, and child items.
  • Parse the API response to extract the fields you need (e.g., work item ID, title, parent ID, attachment URLs).
  • For attachments, loop through each attachment URL and download the files to a local folder using the PAT for authentication.
  • Use a library like ImportExcel (PowerShell) or pandas (Python) to write the work item data (including attachment local paths) to an Excel file.

This method lets you automate the entire process and keep attachments linked directly to your Excel data.


内容的提问来源于stack exchange,提问作者Nanab4u

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 18:02:51