mlreportgen.ppt.Border Class
Namespace: mlreportgen.ppt
Description
Use an mlreportgen.ppt.Border
format object to customize the border of a
table or table entry in a PPT API presentation.
Note
A conflict occurs if a border segment is shared by two table entries. For a conflicting horizontal border segment, Microsoft® PowerPoint® ignores the formats specified by the entry on the bottom. For a conflicting vertical border segment, PowerPoint ignores the formats specified by the entry on the right.
The mlreportgen.ppt.Border
class is a handle
class.
Class Attributes
ConstructOnLoad | true |
HandleCompatible | true |
For information on class attributes, see Class Attributes.
Creation
Description
mlreportgen.ppt.Border
creates an empty
mlreportgen.ppt.Border
object. By default, PowerPoint renders table borders as thin, solid, black lines. Use the object properties
to specify a different border width, style, or color.
mlreportgen.ppt.Border(
sets the Style,
TopStyle,
BottomStyle, LeftStyle,
and RightStyle
properties to the value of style
)style
.
mlreportgen.ppt.Border(
also sets the Color,
TopColor,
BottomColor, LeftColor,
and RightColor
properties to the value of style
,color
)color
.
mlreportgen.ppt.Border(
also sets the Width,
TopWidth,
BottomWidth, LeftWidth,
and RightWidth
properties to the value of style
,color
,width
)width
.
Properties
Style
— Default style of border segments
[]
(default) | "none"
| "solid"
| "dot"
| ...
Default style of border segments, 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"
Data Types: char
| string
Color
— Default color of border segments
[]
(default) | character vector | string scalar
Default color of border segments, 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.w3.org/wiki/CSS/Properties/color/keywords.
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.
Data Types: char
| string
Width
— Default width of border segments
[]
(default) | character vector | string scalar
Default width of border segments, 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
Data Types: char
| string
TopStyle
— Style of top border segment
[]
(default) | "none"
| "solid"
| "dot"
| ...
Style of the top border segment, 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"
Data Types: char
| string
TopColor
— Color of top border segment
[]
(default) | character vector | string scalar
Color of the top border segment, 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.w3.org/wiki/CSS/Properties/color/keywords.
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.
Data Types: char
| string
TopWidth
— Width of top border segment
[]
(default) | character vector | string scalar
Width of the top border segment, 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
Data Types: char
| string
BottomStyle
— Style of bottom border segment
[]
(default) | "none"
| "solid"
| "dot"
| ...
Style of the bottom border segment, 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"
Data Types: char
| string
BottomColor
— Color of bottom border segment
[]
(default) | character vector | string scalar
Color of the bottom border segment, 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.w3.org/wiki/CSS/Properties/color/keywords.
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.
Data Types: char
| string
BottomWidth
— Width of bottom border segment
[]
(default) | character vector | string scalar
Width of the bottom border segment, 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
Data Types: char
| string
LeftStyle
— Style of left border segment
[]
(default) | "none"
| "solid"
| "dot"
| ...
Style of the left border segment, 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"
Data Types: char
| string
LeftColor
— Color of left border segment
[]
(default) | character vector | string scalar
Color of the left border segment, 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.w3.org/wiki/CSS/Properties/color/keywords.
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.
Data Types: char
| string
LeftWidth
— Width of left border segment
[]
(default) | character vector | string scalar
Width of the left border segment, 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
Data Types: char
| string
RightStyle
— Style of right border segment
[]
(default) | "none"
| "solid"
| "dot"
| ...
Style of the right border segment, 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"
Data Types: char
| string
RightColor
— Color of right border segment
character vector | string scalar
Color of the right border segment, 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.w3.org/wiki/CSS/Properties/color/keywords.
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.
Data Types: char
| string
RightWidth
— Width of right border segment
[]
(default) | character vector | string scalar
Width of the right border segment, 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
Data Types: char
| string
Id
— Object identifier for mlreportgen.ppt.Border
object
character vector | string scalar
Object identifier for the mlreportgen.ppt.Border
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
— Tag for mlreportgen.ppt.Border
object
character vector | string scalar
Tag for the mlreportgen.ppt.Border
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
Customize the Border of a Table in a Presentation
To customize the border or a border segment of a table or table entry in a PPT API presentation, specify the border style, color, and width in an mlreportgen.ppt.Border
format object and add the object to the Style
property of an mlreportgen.ppt.Table
or mlreportgen.ppt.TabeEntry
object. This example specifies that the bottom border of the entry in the second row and second column is dashed, red, and has a width of three points.
Create a presentation.
import mlreportgen.ppt.* ppt = Presentation("myTEBorders.pptx"); open(ppt);
Add a slide to the presentation.
slide = add(ppt,"Title and Table");
Create a table.
t = Table(magic(3));
Create a border object to customize the bottom border segment.
border = Border(); border.BottomStyle = "dash"; border.BottomColor = "red"; border.BottomWidth = "3pt";
Apply the custom border to the entry in the second column and second row.
tr2te2 = t.entry(2,2); tr2te2.Style = [tr2te2.Style {border}];
Add a title and the table to the slide.
replace(slide,"Title","Table entry with custom borders"); 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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)