Undefined function or variable 'TOC' in DOM API

15 vues (au cours des 30 derniers jours)
Amruta
Amruta le 2 Sep 2016
Modifié(e) : Adam le 2 Sep 2016
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?**

Réponses (0)

Catégories

En savoir plus sur MATLAB Report Generator Task Examples dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by