Main Content

mlreportgen.ppt.RowHeight Class

Namespace: mlreportgen.ppt

Table row height

Since R2020a

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'.

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

example

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

  • "cm" — centimeters

  • "in" — inches

  • "mm" — millimeters

  • "pc" — picas

  • "pt" — points

Object identifier for the mlreportgen.ppt.RowHeight 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 for the mlreportgen.ppt.RowHeight 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

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);

Version History

Introduced in R2020a