Has anybody used "makePPTCompilable()" ?
Mostrar comentarios más antiguos
I am trying to convert a simple program that uses "Presentation" to a .exe
The code is as follows:
makePPTCompilable();
import mlreportgen.ppt.*
slides = Presentation('mySlideAddPresentation.pptx');
slide1 = add(slides,'Title and Picture');
plane = Picture(which('tulips.jpg'));
plane.X = '4in';
plane.Y = '4in';
plane.Width = '5in';
plane.Height = '2in';
add(slide1,plane);
close(slides);
I get the following error on running the complied version:
" Undefined function 'Presentation' for input arguments of type 'char'"
Any idea what I am missing here?
I am on 2015b , used the following link for help: https://www.mathworks.com/help/rptgen/ug/compile-a-presentation-program.html
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 11 de En. de 2017
Put the whole thing in a function before compiling.
function mainfunction
makePPTCompilable();
import mlreportgen.ppt.*
slides = Presentation('mySlideAddPresentation.pptx');
Import statements don't work in scripts in compiled mode.
Categorías
Más información sobre Multiobjective Optimization en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!