MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Guida Utente Pagina 942

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 986
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 941
13 Create a Report Program
13-90
import mlreportgen.dom.*
d = Document('MyReport','docx','MyReportTemplate');
for rank = 3:5
chapterPart = DocumentPart(d,'Chapter');
while ~strcmp(chapterPart.CurrentHoleId,'#end#')
switch chapterPart.CurrentHoleId
case 'ChapterTitle'
append(chapterPart, ...
sprintf('Rank %i Magic Square',rank));
case 'ChapterContent'
table = append(chapterPart,magic(rank));
table.Width = '2in';
end
moveToNextHole(chapterPart);
end
append(d, chapterPart);
end
close(d);
rptview(d.OutputPath);
You can use a similar approach to automatically number HTML reports, using the CSS
counter-increment and content properties in the template for your report.
See Also
Functions
mlreportgen.dom.Document.createAutoNumberStream |
mlreportgen.dom.Document.getAutoNumberStream
Classes
mlreportgen.dom.AutoNumber | mlreportgen.dom.AutoNumberStream |
mlreportgen.dom.CounterInc | mlreportgen.dom.CounterReset
Vedere la pagina 941
1 2 ... 937 938 939 940 941 942 943 944 945 946 947 ... 985 986

Commenti su questo manuale

Nessun commento