Contenido principal

mlreportgen.ppt.ColSep Class

R2026b

Namespace: 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.

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.

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

example

Properties

expand all

Column separator color, specified as a character vector or string scalar that contains a CSS color name, hexadecimal RGB value, or decimal RGB value.

FormatValue
CSS color nameCSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords.
Hexadecimal RGB valueRGB color in the format "#RRGGBB". Use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. You can use uppercase or lowercase letters.
Decimal RGB color valueRGB color in the format "rgb(r,g,b)", where r, g, and b are nonnegative integers that specify the red, green, and blue values, respectively. Each value range must be between 0 and 255.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Column separator width, specified as a character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "10px" specifies 10 pixels. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Example: "3pt" specifies three points.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Column separator style, specified as one of the values in the table.

Border StyleDescription
"" or "none"No line
"solid"Solid line
"dot"Dotted line
"dash"Dashed line
"largeDash"Dashed line with large dashes
"dashDot"Line with alternating dashes and dots
"largeDashDot"Line with alternating large dashes and dots
"largeDashDotDot"Line with alternating large dashes and pairs of dots
"systemDash"Dashed line using the system-defined dash pattern
"systemDot"Dotted line using the system-defined dot pattern
"systemDashDot"Line with alternating dashes and dots using the system-defined pattern
"systemDashDotDot"Line with alternating dashes and pairs of dots using the system-defined pattern

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Tag, 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. Use this value to help identify where an issue occurs during presentation generation.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Object identifier, specified as a character vector or string scalar. The PPT API generates a session-unique identifier when it creates the presentation element object. You can specify your own value for Id.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

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:

Slide titled Table with custom column separators showing a 3-by-3 magic square with dashed red column separators.

Version History

Introduced in R2020a