mlreportgen.ppt.Border Class
Namespace: mlreportgen.ppt
Border of a table or table entry
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
.
Input Arguments
Type of border to draw, specified as one of these values:
"none"
"solid"
"dot"
"dash"
"largeDash"
"dashDot"
"largeDashDot"
"largeDashDotDot"
"systemDash"
"systemDot"
"systemDashDot"
"systemDashDotDot"
Data Types: char
| string
You can specify:
The name of a color. The name must be a CSS color name. See https://www.w3.org/wiki/CSS/Properties/color/keywords.
A hexadecimal RGB (truecolor) value as
#RRGGBB
. For example,#0000ff
is a shade of blue.
Data Types: char
| string
Width of the border, specified as 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
Data Types: char
| string
Properties
Color of the border segments, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://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.
Example: "blue"
Example: "#0000ff"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Width of the border, specified as 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
Example: "3pt"
specifies three points.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: string
| char
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"
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.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://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.
Example: "blue"
Example: "#0000ff"
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
Example: "3pt"
specifies three points.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
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"
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.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://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.
Example: "blue"
Example: "#0000ff"
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
Example: "3pt"
specifies three points.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
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"
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.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://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.
Example: "blue"
Example: "#0000ff"
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
Example: "3pt"
specifies three points.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
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"
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.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://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.
Example: "blue"
Example: "#0000ff"
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
Example: "3pt"
specifies three points.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
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"
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 document 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 document 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.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)