How can I programmatically add tables in PowerPoint?

7 visualizaciones (últimos 30 días)
Saria Ahmad
Saria Ahmad el 26 de Oct. de 2022
I have several tables that I want to insert in PPT programatically. The tables are splits in chunks. and I store the tables in .mat format. Now I want to insert them into slides in a loop. How can I do this? As I didn't find anything in the mlreportgen.ppt document.
import mlreportgen.ppt.*
ppt = Presentation('myfile');
open(ppt);
dt = dir('*.mat');
for i = 1:length(dt)
TableSlide = add(ppt,'Blank');
img = mlreportgen.ppt.Table(sprintf('subTable%d',i))
add(TableSlide,img);
end
close (ppt)

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by