MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Podręcznik Użytkownika Strona 936

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 986
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 935
13 Create a Report Program
13-84
object alone or in combination with template-based styles or format object-based styles.
This example assumes that the template MyTemplate includes a TOC reference.
import mlreportgen.dom.*;
d = Document('MyReport','docx','MyTemplate');
h1 = {FontFamily('Arial'),FontSize('16pt')};
h2 = {FontFamily('Arial'),FontSize('14pt')};
h = append(d, Heading(1,'Chapter 1'));
h.style = h1;
h = append(d, Heading(2,'Section 1'));
p.style = h2;
close(d);
rptview(d.OutputPath); % Updates the TOC
The Heading objects generate HTML h1, h2 (and so on) elements. By using Heading
objects in an HTML report, you can ensure that your report uses the default styles for
headings implemented by the browser in which you display the report.
See Also
Functions
rptview | unzipTemplate | zipTemplate
Classes
mlreportgen.dom.Heading
Related Examples
“Create a Microsoft Word Template” on page 13-111
“Create an HTML Template” on page 13-122
Przeglądanie stron 935
1 2 ... 931 932 933 934 935 936 937 938 939 940 941 ... 985 986

Komentarze do niniejszej Instrukcji

Brak uwag