How to Export Work Items with Comments to Excel Custom Export
The attached example template
exportWithComments.xlsx exports comments of the Work items. Each comment will appear in new row.
The key elements of the script are The item.attachments collection contains the attachments, and Two nested forEach loop is used: The outer goes through the work items, and the inner goes through each items' attachments.
The result will be something like this:
| Text content is exported to Excel in raw format, which means the wiki text is not formatted, but its markup code will appear in cells. All other Excel cell limitations apply. For example, text longer than 3000 characters is truncated. Pictures also will not be exported. Consider using Word export if a better- formatted export is required. |