Nested table type data-merge

As shown in the figure below, the Word API defines a nested table type as one that performs data-merge after converting a JSON file with a hierarchical structure into a nested structure table.
This section describes the Word API data-merge feature of the nested table type.

About Nested Table Image

Nested table type

Nested type data-merge field

The data-merge field representing a nested table is Word API specific and "AH_DETAIL_TABLE" will be the field name.

Merging data for nested table type

The merging data for the nested table type requires the data for the nested table and the data corresponding to the other fields.
The data corresponding to the other fields is the same as the merging data for the simple type.
The data for nested tables is hierarchical and only JSON format can be used.

Data for nested tables (JSON)

Define the value at which the hierarchical structure starts as the key, and its child elements as an array or object as the value.

Example of CSV file + JSON file

Nested CsvData Image

Example of JSON file + JSON file

Nested JsonData Image

Example of data-merge in nested table type

The figure below shows an example of the execution of what is described in this section.

Nested data merge exec example Image

Data-merge options for nested table type

Width of nested table type

You can specify the following three types of table width with the cell width option of the nested table.

Minimum column width (default)

The default setting of Word API is to display the column width to the minimum.
The option "FixedMinimum" for each interface corresponds to it.

Nested FixedMinimum Image

Even column width [percent]

Specify each column width evenly, in percent.
The option "DividedPct" for each interface corresponds to it.

Nested DividedPct Image

Even column width

Specify each column width evenly, in length.
The option "DividedDxa" for each interface corresponds to it.

Nested DividedDxa Image

Sample files

[Install directory]/samples/templates/Nested_table_template.zip contains a nested table type data-merge template and a sample file of data.