mlreportgen.ppt.TableRow Class
Namespace: mlreportgen.ppt
Table row
Description
Use an object of the mlreportgen.ppt.TableRow
class to include a row in
a table in a PPT API presentation.
To add content to a table row, append mlreportgen.ppt.TableEntry
objects to the row.
The mlreportgen.ppt.TableRow
class is a handle
class.
Class Attributes
HandleCompatible | true |
ConstructOnLoad | true |
For information on class attributes, see Class Attributes.
Creation
Description
creates an empty tableRowObj
= mlreportgen.ppt.TableRowTableRow
object.
Properties
Height
— Row height
[]
(default) | character vector | string scalar
Row height, specified as a character vector or string scalar that consists
of a number followed by a unit of measurement. For example,
'2in'
specifies 2 inches. Valid abbreviations
are:
"px"
— pixels"cm"
— centimeters"in"
— inches"mm"
— millimeters"pc"
— picas"pt"
— points
If the table height is specified and the row height is not specified for any row, the height of all the rows is the same. The row height is determined by dividing the table height by the number of rows. If the height is specified for at least one row, the PPT API ignores the table height. Microsoft® PowerPoint® determines the height of the rows for which the height is not specified.
Font
— Font family for row text
[]
(default) | character vector | string scalar
Font family for row text, specified as a character vector or string scalar. Specify a font that appears in the font list in Microsoft PowerPoint. To see the font list, in PowerPoint, on the Home tab, in the Font group, click the arrow to the right of the font.
ComplexScriptFont
— Font family for complex scripts
[]
(default) | character vector | string scalar
Font family for complex scripts, specified as a character vector or string scalar. Specify a font family to use when substituting in a locale that requires a complex script, such as Arabic or Asian, for rendering text.
FontColor
— Font color of row text
[]
(default) | character vector | string scalar
Font color of row text, specified as a character vector or string scalar that consists of a CSS color name or hexadecimal RGB value.
For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,'#0000ff'
specifies blue.
FontSize
— Font size of row text
[]
(default) | character vector | string scalar
Font size of row text, specified as a character vector or string scalar
that consists of a number followed by a unit of measurement. For example,
'11pt'
specifies 11 points. Valid abbreviations
are:
"px"
— pixels"cm"
— centimeters"in"
— inches"mm"
— millimeters"pc"
— picas"pt"
— points
BackgroundColor
— Background color of row
[]
(default) | character vector | string scalar
Background color of the row, specified as a character vector or string scalar that consists of a CSS color name or hexadecimal RGB value.
For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,'#0000ff'
specifies blue.
Style
— Table row formatting
cell array of PPT format objects
Table row formatting, specified as a cell array of PPT format objects.
Formats that do not apply to a TableRow
object are
ignored.
Children
— Children of this PPT API object
cell array of PPT API objects
Child elements of this PPT API object, specified as a cell array of PPT API objects.
Attributes:
NonCopyable | true |
Parent
— Parent of this PPT API object
PPT object
Parent of this object, specified as a PPT object.
Attributes:
SetAccess | private |
NonCopyable | true |
Id
— ID for this PPT API object
character vector | string scalar
ID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of the object creation. You can specify an ID to replace the generated ID.
Attributes:
NonCopyable | true |
Data Types: char
| string
Tag
— Tag for this PPT API object
character vector | string scalar
Tag for this PPT API object, specified as a character vector or string scalar. A session-unique tag is generated as part of the creation of this object. The generated tag has the form CLASS:ID
, where CLASS
is the object class and ID
is the value of the Id
property of the object.
Specifying your own tag value can help you to identify where issues occur during presentation generation.
Attributes:
NonCopyable | true |
Data Types: char
| string
Methods
Examples
Create a Table Using Entries and Rows
Create a table for a presentation by adding entries to rows and the rows to a table.
Create a presentation.
import mlreportgen.ppt.* ppt = Presentation('myTableRowPresentation.pptx'); open(ppt);
Add a slide to the presentation.
add(ppt,'Title and Content');
Create a table.
table = Table();
Create the first table row.
tr1 = TableRow(); tr1.Style = [tr1.Style {Bold(true)}];
Create the table entries for the first row.
te1tr1 = TableEntry(); p = Paragraph('first entry'); p.FontColor = 'red'; append(te1tr1,p); append(tr1,te1tr1); te2tr1 = TableEntry(); append(te2tr1,'second entry'); append(tr1,te2tr1); te3tr1 = TableEntry(); te3tr1.FontColor = 'green'; append(te3tr1,'third entry'); append(tr1,te3tr1);
Append the first table row to the table.
append(table,tr1);
Create the second table row, append the table entries to the row, and append the row to the table.
tr2 = TableRow(); te1tr2 = TableEntry(); te1tr2.FontColor ='red'; p = Paragraph('first entry'); append(te1tr2,p); append(tr2,te1tr2); te2tr2 = TableEntry(); append(te2tr2,'second entry'); append(tr2,te2tr2); te3tr2 = TableEntry(); te3tr2.FontColor = 'green'; append(te3tr2,'third entry'); append(tr2,te3tr2); append(table,tr2);
Add the table to the presentation.
contents = find(ppt,'Content');
replace(contents(1),table);
Close and view the presentation.
close(ppt); rptview(ppt);
Here is the table in the generated presentation:
Version History
Introduced in R2015b
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)