Undefined function or variable 'TOC' in DOM API
2 次查看(过去 30 天)
显示 更早的评论
when i run following code.. i got error "Undefined function or variable 'TOC'
import mlreportgen.dom.*;
d = Document('mydoc','docx');
open(d);
title = append(d, Paragraph('My TOC Document'));
title.Bold = true;
title.FontSize = '28pt';
toc = append(d,TOC(2,' '));
toc.Style = {PageBreakBefore(true)};
h1 = append(d,Heading1('Chapter 1'));
h1.Style = {PageBreakBefore(true)};
p1 = append(d,Paragraph('Hello World'));
h2 = append(d,Heading2('Section 1.1'));
h2.Style = {PageBreakBefore(true)};
p2 = append(d,Paragraph('Another page'));
h3 = append(d,Heading3('My Subsection 1.1.a'));
p3 = append(d, Paragraph('My Level 3 Heading Text'));
close(d);
rptview(d.OutputPath);
what should i do to use TOC class in DOM API?**
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Report Generator Task Examples 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!