mlreportgen.ppt.ColSep class

Package: mlreportgen.ppt

Table column separators

Description

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

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

Class Attributes

ConstructOnLoad
true
HandleCompatible
true

For information on class attributes, see Class Attributes (MATLAB).

Creation

Description

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

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

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

example

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

Properties

expand all

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

Column separator color, 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.crockford.com/wrrrld/color.html.

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

Column 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 (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 customize the lines that separate table columns, set the properties of an mlreportgen.ppt.ColSep object and add the object to the Style property of an mlreportgen.ppt.Table object. This example makes the column separators dashed and red, with a line width of three points.

Create a presentation.

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

Add a slide to the presentation.

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

Create a table and set custom column separators.

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

Add a title and the table to the slide.

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

Close and view the presentation.

close(ppt);
rptview(ppt);

Here is the table in the generated presentation:

Introduced in R2020a