Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.ppt.TablePlaceholder.replace

Package: mlreportgen.ppt

Replace table in table placeholder

Syntax

tableObj = replace(tablePlaceholder,table)

Description

example

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

Examples

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.

replace(contents(1),t1);

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

close(slides);

if ispc
    winopen(slidesFile);
end

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

Was this topic helpful?