This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Package: mlreportgen.ppt

Replace table in table placeholder


tableObj = replace(tablePlaceholder,table)



tableObj = replace(tablePlaceholder,table) replaces the table in a table placeholder.


collapse all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myTableReplacePresentation.pptx';
slides = Presentation(slidesFile);
slide1 = add(slides,'Title and Table');

Create an mlreportgen.ppt.Table object.

t1 = Table(magic(7));

Search in slide1 for Table.

contents = find(slide1,'Table');

Replace the first table placeholder whose Name property is Table with a table.


Generate the presentation. Open myTableReplacePresentation.pptx. On a Windows® platform, you can open the presentation in MATLAB®:


if ispc

Input Arguments

collapse all

Table placeholder to replace table, specified as an mlreportgen.ppt.TablePlaceholder object.

Table to use as a replacement, specified as an mlreportgen.ppt.Table object.

Output Arguments

collapse all

Table, returned as an mlreportgen.ppt.Table object.

Introduced in R2015b