I need to create a Standalone Desktop App that creates a Word or PDF document

조회 수: 83 (최근 30일)
Hello,
I have created an App with Matlab App Designer wich nedds to create a ".docx" or ".pdf" document in order to summary and conclude the process the program did. Even if I reach this goal using the App Designer, when I create a Standalone Desktop App, it stops generating the file. How could I do it?
Thanks.
  댓글 수: 3
Lander Azkarate Ormazabal
Lander Azkarate Ormazabal 2024년 10월 29일 13:27
This is a simplified version I did, where I just sum two variables and write the answer in a ".docx" document. As I said before, it creates correctly the file when it is run in the App Designer, but stops working when you transfer it to a Standalone Desktop Application.

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

채택된 답변

Hitesh
Hitesh 2024년 10월 30일 13:16
Hi Lander,
When executing the standalone application generated from "Sum_Word.mlapp" file you provided, it resulted in the error "Unable to check out a Report Generator license". This error was preventing the .docx file from being generated. To verify your license access, you can execute the following command:
license('test', 'MATLAB_Report_Generator')
To avoid this issue, you need to use the "actxserver" function to create a COM server for Microsoft Word. This approach does not require a license to generate .docx or .pdf files when running the standalone application, as it creates a local OLE Automation server. I revised the "KalkulatuButtonPushed" function in the MATLAB App Designer and then created the standalone application, which successfully generated the .docx file and wrote the solution into it. I've attached the revised "Sum_Word.mlapp" file for your reference.
For more information on "actxserver" function, refer to the below MATLAB Documentation:

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by