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.Table.replace

Package: mlreportgen.ppt

Replace table with another table

Syntax

tableObj = replace(table,replacementTable)

Description

example

tableObj = replace(table,replacementTable) replaces a table with another table.

Examples

collapse all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myTableReplacePresentation.pptx';
slides = Presentation(slidesFile);
slide1 = add(slides,'Blank');

Create an mlreportgen.ppt.Table object.

t1 = Table(magic(7));
t1.X = '2in';
t1.Y = '2in';
t1.Width = '6in';
t1.Height = '4in';

Search in slide1 for Table.

add(slide1,t1);

Create another mlreportgen.ppt.Table object.

t2 = Table(magic(9));
t2.X = '2in';
t2.Y = '2in';
t2.Width = '7in';
t2.Height = '5in';

Replace t1 with t2.

replace(t1,t2);

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 to replace table, specified as an mlreportgen.ppt.TablePlaceholder object.

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

Output Arguments

collapse all

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

Introduced in R2015b

Was this topic helpful?