How to add Picture and Table on the same slide in ppt MATLAB report generation?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kaustubh hike
le 28 Juil 2021
Réponse apportée : Rahul Singhal
le 3 Août 2021
Hello,
I want to add image and table on the same slide . Since there are many layout availble . (layouts = getLayoutNames(ppt,masters{1}))
Which layout should I use for the same ?
0 commentaires
Réponse acceptée
Vignesh Murugavel
le 28 Juil 2021
You can create a custom slide with picture and table in same slide.
Refer the below Link to know more about how to create a custom template
You can add a slide using the PPT API. You can find out the slide layout name in PowerPoint and using the API.
Refer Link for more info:
0 commentaires
Plus de réponses (1)
Rahul Singhal
le 3 Août 2021
Hi Kaustubh,
You can use the "Two Content" layout to add a picture and table to the same slide.
Below is an example:
% Create a presentation
import mlreportgen.ppt.*
ppt = Presentation("myPresentation.pptx");
open(ppt);
% Add a slide using the "Two Content" layout
slide = add(ppt,"Two Content");
replace(slide,"Title","Slide with Picture and Table")
% Add a picture on the left side of the slide
replace(slide,"Left Content",Picture(which("b747.jpg")));
% Add a table on the right side of the slide
replace(slide,"Right Content",Table(magic(5)));
% Close and view the presentation
close(ppt);
rptview(ppt);
If you wish to customize the placeholders location or add more placeholders to it, you can setup a custom template to add a customized layout by following the link: https://www.mathworks.com/help/rptgen/ug/set-up-the-powerpoint-template.html.
Thanks,
Rahul
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!