The Group Tag

During transformation, Excel Groups (Outlines) may created using the "group" tag. This tag must be used with a body. Excel Groups may be created on the rows from the body of the tag or on the columns from the body of the tag. It is possible to nest "group" tags. Excel will display nested group outlines.

If the number of rows or columns to be grouped is dynamic, then it is best to use a looping tag. Looping tags support the same attributes as the "group" tag, but it groups rows or columns on the transformed rows or columns, the number of which is determined dynamically.


  • The "group" tag supports all base tag attributes.
  • groupDir: String Required. Create an Excel Group (Outline) out of the resultant rows or columns. Here are the possible values:
    • rows Create an Excel Group (Outline) out of the resultant rows. This is the default.
    • cols Create an Excel Group (Outline) out of the resultant columns.
    • none Do not create an Excel Group (Outline).
  • collapse: boolean Optional. This determines whether the Excel Group (Outline) created is in a collapsed state. The default is false (not collapsed).


In this example, Excel Groups (Outlines) of rows and columns are created. One row group and one column group is nested.

Along the top of the template, adjacent cells obscure each other's contents, so here is the content of the first row of cells:

  • E1: <jt:group groupDir="cols">Col1
  • F1: <jt:group groupDir="cols">Col2
  • G1: Col3</jt:group>
  • H1: Col4</jt:group>
  • I1: (empty)
  • J1: <jt:group groupDir="cols" collapse="true">Col1
  • K1: Col2
  • L1: Col3</jt:group>
  • M1: Show me!!!
Group Template

After transformation, Excel Groups (Outlines) have been created. Notice that columns J, K, and L are hidden due to the collapsed column group, and that rows 12-14 are also hidden due to the collapsed row group.

Group Result

The viewer can click on the "+" signs in Excel to expand the group, and on the "-" signs to collapse the group.