Page History
The code in this section demonstrates some scenarios with a Generic Table tool. The code may not be executable or may not return the correct result. This is only the idea of how to use the Generic Table tool and how it works.
The code shown below prints the row, column, and its value in the form of an HTML table.
Code Block | ||
---|---|---|
| ||
#foreach($diagram in $project.getDiagrams("Generic Table"))
<table>
<tr>
#set($table = $generic.getTable($diagram))
<td>#</td>
#foreach($colName in $table.columnNames)
<td>$colName</td>
#end
</tr>
#foreach($row in $table.rows)
<tr>
<td>$velocityCount</td>
#foreach($col in $table.columnIds)
<td>$table.getValueAsString($row, $col)</td>
#end
</tr>
#end
</table>
#end |
Tip |
---|
How to learn more about the GenericTableTool
|
The Generic Table Export dialog.
...