MATLAB: How can i perfect use ColSpan in table with report generator

MATLAB Report Generatorreportreport generator

Best Answer

Hello Tong,
You can update the RowSep, ColSep styles of TableEntry using the style property to remove the TableEntry borders.
table.entry(1,2).Style = [table.entry(1,2).Style {mlreportgen.dom.ColSep('none'), mlreportgen.dom.RowSep('none')}];
Below is the sample code on using the RowSep, ColSep for particular table entry
import mlreportgen.dom.*
d = Document('ColSepCheck', 'pdf');
table = Table(magic(4));
table.RowSep = 'Solid';
table.ColSep = 'Solid';
table.Border = 'Solid';
% append the ColSep and RowSep styles to the existing TableEntry styles.
table.entry(1,2).Style = [table.entry(1,2).Style {mlreportgen.dom.ColSep('none'), mlreportgen.dom.RowSep('none')}];
append(d,table);
close(d);
rptview(d);
On the other hand RowSpan and ColSpan properties are used to span the TableEntry to multiple rows/columns.