mlreportgen.ppt.Border Class
R2026bNamespace: mlreportgen.ppt
Border of a table, table entry, picture, or video
Description
Use an mlreportgen.ppt.Border format object to customize the border of a
table, table entry, picture, or video in a PowerPoint (PPT) API presentation.
Note
A conflict occurs if two table entries share a border segment. 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.
Input Arguments
Type of border to draw, specified as one of the values in the table.
| Border Style | Description |
|---|---|
"" 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 |
Data Types: char | string
Color of border, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
| Format | Value |
|---|---|
| CSS color name | CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords. |
| Hexadecimal RGB value | RGB 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. |
Example: "red" specifies a red color by using the CSS
color name.
Example: "#0000ff" specifies a blue color by using
the hexadecimal RGB value.
Data Types: char | string
Width of the border, 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.
Data Types: char | string
Properties
Default color of the page border segments, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
| Format | Value |
|---|---|
| CSS color name | CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords. |
| Hexadecimal RGB value | RGB 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. |
Example: "red" specifies a red color by using the CSS
color name.
Example: "#0000ff" specifies a blue color by using
the hexadecimal RGB value.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char | string
Width of the border, specified as a character vector or string scalar that contains
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
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: string | char
Style of the bottom border segment, specified as one of the values in the table.
| Border Style | Description |
|---|---|
"" 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
Color of the bottom border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
| Format | Value |
|---|---|
| CSS color name | CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords. |
| Hexadecimal RGB value | RGB 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. |
Example: "red" specifies a red color by using the CSS
color name.
Example: "#0000ff" specifies a blue color by using
the hexadecimal RGB value.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char | string
Width of the bottom border segment, specified as a character vector or string scalar that contains
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
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
Style of the top border segment, specified as one of the values in the table.
| Border Style | Description |
|---|---|
"" 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
Color of the top border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
| Format | Value |
|---|---|
| CSS color name | CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords. |
| Hexadecimal RGB value | RGB 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. |
Example: "red" specifies a red color by using the CSS
color name.
Example: "#0000ff" specifies a blue color by using
the hexadecimal RGB value.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char | string
Width of the top border segment, specified as a character vector or string scalar that contains
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
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
Style of the left border segment, specified as one of the values in the table.
| Border Style | Description |
|---|---|
"" 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
Color of the left border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
| Format | Value |
|---|---|
| CSS color name | CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords. |
| Hexadecimal RGB value | RGB 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. |
Example: "red" specifies a red color by using the CSS
color name.
Example: "#0000ff" specifies a blue color by using
the hexadecimal RGB value.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char | string
Width of the left border segment, specified as a character vector or string scalar that contains
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
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
Style of the right border segment, specified as one of the values in the table.
| Border Style | Description |
|---|---|
"" 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
Color of the right border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
| Format | Value |
|---|---|
| CSS color name | CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords. |
| Hexadecimal RGB value | RGB 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. |
Example: "red" specifies a red color by using the CSS
color name.
Example: "#0000ff" specifies a blue color by using
the hexadecimal RGB value.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char | string
Width of the right border segment, specified as a character vector or string scalar that contains
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
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
Default style of border segments, specified as one of the values in the table.
| Border Style | Description |
|---|---|
"" 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
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.TableEntry object. This example specifies that the bottom border of the entry in the second row and second column is dashed and red, with 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:

Since R2026b
To customize the border of a picture in a PPT API presentation, specify
the border style, color, and width in an mlreportgen.ppt.Border object and
add the object to the Style property of an
mlreportgen.ppt.Picture object.
Create a presentation.
import mlreportgen.ppt.* ppt = Presentation("myPictureBorder.pptx"); open(ppt);
Add a slide to the presentation.
slide = add(ppt,"Title and Picture");Create a picture.
pic = Picture(which("peppers.png"));Create a border object and apply it to the picture.
border = Border("solid","red","3pt"); pic.Style = [pic.Style {border}];
Add a title and the picture to the slide.
replace(slide,"Title","Picture with a custom border"); replace(slide,"Picture",pic);
Close and view the presentation.
close(ppt); rptview(ppt);
Since R2026b
To customize the border of a video in a PPT API presentation, specify the
border style, color, and width in an mlreportgen.ppt.Border object and
add the object to the Style property of an
mlreportgen.ppt.Video object.
Create a presentation.
import mlreportgen.ppt.* ppt = Presentation("myVideoBorder.pptx"); open(ppt);
Add a slide to the presentation.
slide = add(ppt,"Title and Content");Create a video.
v = Video(which("xylophone.mp4"));Create a border object and apply it to the video.
border = Border("solid","red","3pt"); v.Style = [v.Style {border}];
Add a title and the video to the slide.
replace(slide,"Title","Video with a custom border"); replace(slide,"Content",v);
Close and view the presentation.
close(ppt); rptview(ppt);
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.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)