Main Content

mlreportgen.ppt.RowSep Class

Namespace: mlreportgen.ppt

Table row separators

Since R2020a

Description

Use an mlreportgen.ppt.RowSep format object to customize the lines that separate the rows of a table in a PPT API presentation.

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

Class Attributes

ConstructOnLoad
true
HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

mlreportgen.ppt.RowSep creates an empty mlreportgen.ppt.RowSep object. By default, PowerPoint® draws thin, solid, black lines between rows. Use the object properties to specify a different line width, style, or color.

mlreportgen.ppt.RowSep(style) sets the Style property to the value of style.

mlreportgen.ppt.RowSep(style,color) also sets the Color property to the value of color.

mlreportgen.ppt.RowSep(style,color,width) also sets the Width property to the value of width.

example

Properties

expand all

Row separator style, specified as a character vector or string scalar. Specify one of these values:

  • "none"

  • "solid"

  • "dot"

  • "dash"

  • "largeDash"

  • "dashDot"

  • "largeDashDot"

  • "largeDashDotDot"

  • "systemDash"

  • "systemDot"

  • "systemDashDot"

  • "systemDashDotDot"

Row separator color, specified as a character vector or string scalar that consists of a CSS color name or hexadecimal RGB value.

Row separator width, specified as a character vector or string scalar that consists of a number followed by an abbreviation for a unit of measurement. For example, '3pt' specifies three points. Valid abbreviations are:

  • "px" — pixels

  • "cm" — centimeters

  • "in" — inches

  • "mm" — millimeters

  • "pc" — picas

  • "pt" — points

Object identifier for the mlreportgen.ppt.RowSep 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.RowSep 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 customize the lines that separate table rows, set the properties of an mlreportgen.ppt.RowSep object and add the object to the Style property of an mlreportgen.ppt.Table object. This example makes the row separators dashed and red with a line width of three points.

Create a presentation.

import mlreportgen.ppt.*
ppt = Presentation("myRowSep.pptx");
open(ppt);

Add a slide to the presentation.

slide = add(ppt,"Title and Table");

Create a table and set custom row separators.

t = Table(magic(3));
t.Style = [t.Style {RowSep("dash","red","3pt")}];

Add the title and table to the slide.

replace(slide,"Title","Table with custom row separators");
replace(slide,"Table",t);

Close and view the presentation.

close(ppt);
rptview(ppt);

Here is the table in the generated presentation:

Version History

Introduced in R2020a