Add a Title and Table
slide to a presentation and then replace the title and table placeholders with your own title and table.
Import the PPT package so that you do not have to use long, fully qualified names for the PPT API classes.
Create a presentation.
Add a slide that has a Title and Table
layout.
Use the find
method of the slide object to find the placeholder object that has the name Title
.
titlePlaceholderObj =
TextBoxPlaceholder with properties:
Bold: []
Font: []
ComplexScriptFont: []
FontColor: []
FontSize: []
Italic: []
Strike: []
Subscript: []
Superscript: []
Underline: []
BackgroundColor: []
VAlign: []
Name: 'Title'
X: []
Y: []
Width: []
Height: []
Style: []
Children: []
Parent: [1×1 mlreportgen.ppt.Slide]
Tag: 'ppt.TextBoxPlaceholder:30:96'
Id: '30:96'
The find
method returns an mlreportgen.ppt.TextBoxPlaceholder
object.
Replace the placeholder content with the title text.
Use the find
method of the slide object to find the placeholder object that has the name Table
.
tablePlaceholderObj =
TablePlaceholder with properties:
Bold: []
Font: []
ComplexScriptFont: []
FontColor: []
FontSize: []
Italic: []
Strike: []
Subscript: []
Superscript: []
Underline: []
BackgroundColor: []
VAlign: []
Name: 'Table'
X: []
Y: []
Width: []
Height: []
Style: []
Children: []
Parent: [1×1 mlreportgen.ppt.Slide]
Tag: 'ppt.TablePlaceholder:31:97'
Id: '31:97'
The find
method returns an mlreportgen.ppt.TablePlaceholder
object.
Replace the table placeholder with a table for a fourth-order magic square.
Close and view the presentation
Here is the slide in the generated presentation: