Class: ModelAdvisor.FormatTemplate
Package: ModelAdvisor

Add column titles to table


setColTitles(ft_obj, {col_title_1, col_title_2, ...})


setColTitles(ft_obj, {col_title_1, col_title_2, ...}) is method you must use when you create a template object that is a table type. Use it to specify the titles of the columns in the table.

    Note:   Before adding data to a table, you must specify column titles.

Input Arguments


A handle to a template object.


A cell of character vectors or handles to formatting objects, specifying the column titles.

Valid formatting objects are: ModelAdvisor.Image, ModelAdvisor.LineBreak, ModelAdvisor.List, ModelAdvisor.Paragraph, ModelAdvisor.Table, and ModelAdvisor.Text.

The order of the col_title_N inputs determines which column the title is in. If you do not add data to the table, the Model Advisor does not display the table in the result.


Create a table object, ft, and specify two column titles:

ft = ModelAdvisor.FormatTemplate('TableTemplate');
setColTitles(ft, {'Index', 'Block Name'});

Was this topic helpful?