programmatically define save location of reports generated through mlreportgen.dom

21 views (last 30 days)
Mattj.d. on 31 May 2018
Answered: Wilson A N on 22 Jun 2018
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
how can I programmatically define that location in matlab? I've changed the output path as shown in here
but that only changes were the .htmx file saves, which is no good.

Answers (1)

Wilson A N
Wilson A N on 22 Jun 2018
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');
Can you provide a sample code so that I can check it out at my end.

Community Treasure Hunt

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

Start Hunting!

Translated by