Word Export Template: Items in Tables with Upstream Relationships (Macros for clean up)

Sathiya
Sathiya
  • Updated
  • Jama Connect® version(s)
    • Cloud/CVC
    • Self-hosted

Summary

Word Export Templates cannot place a table inside another table, so the Office Template cannot show related upstream items as a nested table within a column. When exporting from Jama, this limitation causes the output to generate separate tables per Component, Set, or Folder, split across the document. 

The macros here don't create nested tables — they join these separated tables into one continuous table and remove any leftover tables that contain only a header row. Which macro to use depends on whether Jama's whitespace-cleanup export parameter is turned on or off.
 

Resolution

What the export template does

The export uses the Default Template, so you can export from any location in the Explorer or Filters. It formats all Components, Sets, and Folders as headers and places all items in a table containing: Item Name, Item ID, Description, and Upstream Items.

Check your export settings
A December 2020 release of Jama Connect added a parameter for Office Exports to clean up whitespace in the output. Check whether this parameter is enabled before choosing which macro to use. 

 

Option A: If whitespace cleanup is OFF, Use the Table Joiner macro

Scenario

Issue Addressed

Clean Up Action

Jama is not cleaning up whitespace per the export parameter Tables are separated by newlines in the doc, resulting in single-row tables of items Macro adjusts widths of tables with 4 columns (set based on Item table) and joins tables separated by newlines
Components, Sets, and Folders without items Single-row table containing only table headers Macro uses the name of the first column and the count of rows to identify and delete tables that contain only a header row

 

Before Macro

Table joiner - before macro.png

After Macro

  • Table joiner - after macro.png
  • Macro asks user to:
    • Run table joiner
    • Run deletion of single row tables
    • Save file as docx (this is just a reminder message)

Option B:  If whitespace cleanup is ON — use the Header Alignment Macro

Scenario

Issue Addressed

Clean Up Action

Jama is cleaning up whitespace per export parameter Combined tables have misaligned header rows (different column widths) The macro adjusts the widths of the 1st row columns to match the widths of 2nd row
Components, Sets, and Folders without items Single-row table containing only table headers Macro uses the name of the first column and the number of rows to identify and delete tables that contain only a header row

Before Macro

Header row alignment Macro - before macro.png

After Macro

Header row alignment Macro - after macro.png
  • Macro asks the user to:
    • Run header alignment
    • Run deletion of single-row tables
    • Save file as docx (this is just a reminder message)

Note on macro security: 

Enable macros only from trusted sources. Confirm the macro file comes directly from this article before running it.

Deployment: 

Upload the applicable macro file to Office Export Templates.

Additional Resources

Feedback:
We welcome your input! Please sign in to leave any comments, suggestions, or ideas for improvement below.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.