mlreportgen.ppt.RowHeight class

Package: mlreportgen.ppt

Table row height

Description

Use an mlreportgen.ppt.RowHeight format object to specify the height of a table row in a PPT API presentation.

Note

If the row content is too large to fit in the specified height or the specified height value is negative, the generated presentation adjusts the row height to accommodate the content.

The mlreportgen.ppt.RowHeight class is a handle class.

Class Attributes

ConstructOnLoad
true
HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

rowHeightnObj = mlreportgen.ppt.RowHeight() sets the Value property to '0.41in'.

example

rowHeightObj = mlreportgen.ppt.RowHeight(value) sets the Value property to value.

Properties

expand all

Table row height, specified as a character vector or string scalar that consists of a number followed by an abbreviation for a unit of measurement. For example, '1in' specifies one inch. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

ID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of object creation. You can specify an ID to replace the generated ID.

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 an issue occurred during presentation generation.

Examples

collapse all

To specify the height of a table row in a presentation, add an mlreportgen.ppt.RowHeight format object to the Style property of the table row. This example generates a table where the height of the first row is two inches and the height of the second row is one inch.

Create a presentation.

import mlreportgen.ppt.*
ppt = Presentation("myRowHeight.pptx");
open(ppt);
slide = add(ppt,"Title and Content");

Create a table and specify the height of each row.

t = Table(magic(2));
t.row(1).Style = [t.row(1).Style {RowHeight("2in")}];
t.row(2).Height = "1in";
replace(slide,"Content",t);

Close and view the presentation.

close(ppt);
rptview(ppt);
Introduced in R2020a