User`s guide

addHTMLFile
11-13
Examples
Append HTML File Contents to a Document
In a text editor, create a file and enter this text:
<!DOCTYPE html>
<html>
<head>
<title>My First HTML</title>
</head>
<body>
<p>This is the <b>first</b> paragraph.</p>
<p>This is the <b>second</b> paragraph</p>
</body>
</html>
Save the file in the MATLAB current folder as html_example.html.
Create a Word report.
import mlreportgen.dom.*;
rpt = Document('HTMLReport','docx');
Append the HTML file content to the document.
addHTMLFile(rpt,'html_example.html');
Generate the Word report.
close(rpt);
rptview(rpt.OutputPath);
“Append HTML File Contents to DOM Reports”
See Also
mlreportgen.dom.Document.addHTMLFile | mlreportgen.dom.HTML |
mlreportgen.dom.HTMLFile