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 mlreportgen.ppt.TableRow
object
cell array of PPT API objects
Child elements of mlreportgen.ppt.TableRow
object, specified as a cell array of PPT
API objects.
Attributes:
NonCopyable | true |
Parent
— Parent of mlreportgen.ppt.TableRow
object
PPT API object
Parent of this object, specified as a PPT API object. A PPT API object must only have one parent.
Attributes:
SetAccess | private |
NonCopyable | true |
Id
— Object identifier for mlreportgen.ppt.TableRow
object
character vector | string scalar
Object identifier for the mlreportgen.ppt.TableRow
object, specified as a
character vector or string scalar. The PPT API generates a session-unique identifier
when it creates the document element object. You can specify your own value for
Id
.
Attributes:
NonCopyable | true |
Data Types: char
| string
Tag
— Tag for mlreportgen.ppt.TableRow
object
character vector | string scalar
Tag for the mlreportgen.ppt.TableRow
object, specified as a character vector or
string scalar. The PPT API generates a session-unique tag 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. Specify your own tag value to help
you identify where to look when an issue occurs during document 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
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
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)