Class: mlreportgen.ppt.Table Package: mlreportgen.ppt
Replace table with another table
tableObj = replace(table,replacementTable)
example
tableObj = replace(table,replacementTable) replaces a table with another table.
tableObj
table
replacementTable
expand all
Create a presentation.
import mlreportgen.ppt.* slidesFile = 'myTableReplacePresentation.pptx'; slides = Presentation(slidesFile); slide1 = add(slides,'Blank');
Create an mlreportgen.ppt.Table object.
mlreportgen.ppt.Table
t1 = Table(magic(7)); t1.X = '2in'; t1.Y = '2in'; t1.Width = '6in'; t1.Height = '4in';
Search in slide1 for Table.
slide1
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.
t1
t
replace(t1,t2);
Generate the presentation. Open myTableReplacePresentation.pptx. On a Windows® platform, you can open the presentation in MATLAB®:
myTableReplacePresentation.pptx
close(slides); if ispc winopen(slidesFile); end
Table to replace table, specified as an mlreportgen.ppt.Table object.
Table to use as replacement, specified as an mlreportgen.ppt.Table object.
Table, returned as an mlreportgen.ppt.Table object.
mlreportgen.ppt.Table | mlreportgen.ppt.TablePlaceholder
mlreportgen.ppt.TablePlaceholder