www.gusucode.com > rptgen 案例源码程序 matlab代码 > rptgen/CreateaTableExample.m
%% Create a Table %% import mlreportgen.dom.*; d = Document('myreport','html'); open(d); t = Table(magic(5)); t.Style = {RowHeight('1in')}; t.Border = 'solid'; t.BorderWidth = '1px'; t.ColSep = 'solid'; t.ColSepWidth = '1'; t.RowSep = 'solid'; t.RowSepWidth = '1'; % Set this property first to prevent overwriting alignment properties t.TableEntriesStyle = {FontFamily('Arial'),Width('1in'),Color('red'),Bold}; t.TableEntriesHAlign = 'center'; t.TableEntriesVAlign = 'middle'; append(d,t); close(d); rptview(d.OutputPath);