Has anybody used "makePPTCompilable()" ?

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 日

0 投票

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 日

0 投票

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.

質問済み:

Ish
2017 年 1 月 11 日

編集済み:

2017 年 1 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by