Has anybody used "makePPTCompilable()" ?

조회 수: 3 (최근 30일)
Ish
Ish 2017년 1월 11일
편집: Walter Roberson 2017년 1월 12일
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?

채택된 답변

Ish
Ish 2017년 1월 11일
Hi Sean,
Thank you for your response.
In that case can the function be added as additional files during compilation? What is the best way to make it a part of the package?
  댓글 수: 2
Sean de Wolski
Sean de Wolski 2017년 1월 11일
Yes, just include it in the deployment project, along with the slide templates.
Ish
Ish 2017년 1월 12일
Awesome! Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sean de Wolski
Sean de Wolski 2017년 1월 11일
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.

Community Treasure Hunt

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

Start Hunting!

Translated by