Can we use DocumentPart in Report Generation?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
SRUSHTI KHATAU
am 9 Nov. 2021
Kommentiert: SRUSHTI KHATAU
am 11 Nov. 2021
I want to generate a Report with template. Can I use DocumentPart in report generation? Does DocumentPart support to report? if not please suggest some alternative solution. Thank you.
Here I am attaching small example
import mlreportgen.report.*
import mlreprtgen.dom.*
R = Report('Report', 'docx', 'Template');
append(R, DocumentPart(R, 'Content'))
close(R)
rptview(R)
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Kevin Holly
am 9 Nov. 2021
It looks like it can from the example from the documentation.
4 Kommentare
Kevin Holly
am 9 Nov. 2021
Ah, reporter class... the example I linked appends it to a document class, but I believe you can append the document container to the reporter container. I think you need to append the DocumentPart to the Document container. Then I believe you could append that to the report. I haven't used this before, let me know if this works.
import mlreportgen.report.*
import mlreportgen.dom.*
R = Report('Report', 'docx', 'Template');
D = Document('test','docx');
append(D, DocumentPart(D.Type))
append(R,D)
close(R)
rptview(R)
Siehe auch
Kategorien
Mehr zu MATLAB Report Generator Task Examples finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!