Cannot insert more than one section break with mlreportgen
2 ビュー (過去 30 日間)
古いコメントを表示
Hi there,
I'm doing Programmatic Report Creation, now I'm stuck at cannot insert a second section break into docx file.
I tried with my own code and example code ( referred this page ) on macOS and Windows, all failed. I doubt that is it a bug?
Here is the example code I used, I'm curious if anyone can make the second section break appear.
Platform: MATLAB 2016a, macOS 10.12.1 & Windows 10
import mlreportgen.dom.*
rpt = Document('test','docx');
append(rpt,Heading(1,'Magic Square Report','Heading 1'));
sect1 = DOCXPageLayout;
sect1.PageSize.Orientation = 'landscape';
sect1.PageSize.Height = '8.5in';
sect1.PageSize.Width = '11in';
append(rpt,Paragraph('The next page shows a magic square.'),sect1);
table = append(rpt,magic(22));
table.Border = 'solid';
table.ColSep = 'solid';
table.RowSep = 'solid';
append(rpt,Heading(1,'Magic Square Report','Heading 1'));
sect2 = DOCXPageLayout;
sect2.PageSize.Orientation = 'landscape';
sect2.PageSize.Height = '8.5in';
sect2.PageSize.Width = '11in';
append(rpt,Paragraph('The next page shows a magic square.'),sect2);
table2 = append(rpt,magic(22));
table2.Border = 'solid';
table2.ColSep = 'solid';
table2.RowSep = 'solid';
close(rpt);
rptview(rpt.OutputPath);
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Title Pages, Tables of Contents, Lists of Figures, Tables, and Captions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!