programmatically define save location of reports generated through mlreportgen.dom

i'm figuring out how to programmatically generate reports with matlab, I've got a finished product for one of the experiments I run. I am using mlreportgen.dom
The current save location is at
C:/Users/AppData/Local/Temp/mlreportgen
how can I programmatically define that location in matlab? I've changed the output path as shown in here
https://www.mathworks.com/help/rptgen/ug/mlreportgen.dom.document-class.html
but that only changes were the .htmx file saves, which is no good.

답변 (1개)

Hi Mattj,
I was able to use the 'OutputPath' parameter given in the mlreportgen.dom for saving the output files in .pdf, .html, .docx into the specified outpath path. I modified the same example given in the documentation page you had listed. The modified code is given below:
import mlreportgen.dom.*;
d = Document('mydoc','pdf');
d.OutputPath = 'E:\Workspace\Newpath.pdf'
append(d,'Hello World');
close(d);
rptview(d.OutputPath);
Can you provide a sample code so that I can check it out at my end.

댓글 수: 1

I realize it's been awhile since anyone touched this thread, but just in case anyone else needed to know:
Yes, using d.OutputPath works to set the output path for the report.
I used a report (rpt = Report('reportname','pdf'), and it worked beautifully.

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

카테고리

도움말 센터File Exchange에서 MATLAB Report Generator Task Examples에 대해 자세히 알아보기

질문:

2018년 5월 31일

댓글:

2024년 3월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by