MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Guide de l'utilisateur Page 913

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 986
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 912
Create and Format Tables
13-61
close(doc);
rptview(doc.OutputPath);
Format a Table
You can format a table programmatically, using DOM format objects or format
properties. You can also use Word and HTML template styles. For information about
these formatting techniques and format inheritance, see “Report Formatting Approaches”
on page 13-20.
Format a Table Programmatically
You can use format objects to format tables or use Table format properties to specify
commonly used table formats. This example uses:
Border, ColSep, and RowSep format objects to specify a red table border and the
green column and row separators
The Width format property to specify the table width
import mlreportgen.dom.*;
doc = Document('test','html');
table = Table(magic(5));
table.Style = {Border('inset','red','3px'), ...
ColSep('single','green','1px'), ...
RowSep('single','green','1px')};
table.Width = '50%';
append(doc, table);
close(doc);
rptview(doc.OutputPath);
Use these format objects and format properties to format a table.
Formatting Format Object Format Property
Width of table Width Width
Color of table background BackgroundColor BackgroundColor
Create border around table Border Border
Vue de la page 912
1 2 ... 908 909 910 911 912 913 914 915 916 917 918 ... 985 986

Commentaires sur ces manuels

Pas de commentaire