Report generator only showing names of the objects instead of their content

조회 수: 2 (최근 30일)
Jack Arnoldi
Jack Arnoldi 2019년 7월 16일
답변: Rahul Singhal 2019년 7월 25일
Hello everyone!
I have a code generating a full report but I want to add an image in the header so I created a template and tried out. But now the word file only gives me the name of the objects in the report and not the actual content like this:
Do anyone know where does this problem comes from?
My code is
rpt = Document('Report','docx', 'template.dotx');
moveToNextHole(rpt)
%% title page generation
tp = TitlePage;
tp.Title = 'Report';
tp.Subtitle = 'This report is generated from the test.';
tp.Author = 'Jack'
append(rpt, tp);
%% Adding table of contents
append(rpt, TableOfContents);
%% Summary of the whole regressiotest
ChapterRegression = Chapter;
ChapterRegression.Title = 'Summary';
SectionIntro = Section;
SectionIntro.Title = 'Introduction';
para = Paragraph('The test script ran all the tests.');
para.Style = {FontSize('14pt'), FirstLineIndent('0.2in')};
add(SectionIntro, para);
add(ChapterRegression, SectionIntro);
append(rpt, ChapterRegression)
close(rpt)
My dotx template just have one Rich Text Content Control hole.
Thank you in advance!

답변 (1개)

Rahul Singhal
Rahul Singhal 2019년 7월 25일

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by