This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Class: mlreportgen.dom.Document
Package: mlreportgen.dom

Append HTML string to document


htmlObjOut = addHTML(documentObj,htmlText)


htmlObjOut = addHTML(documentObj,htmlText) converts a string of HTML text to a group of DOM objects and appends the group to the Document object documentObj.

Input Arguments

expand all

Document object to append content to, specified as an mlreportgen.dom.Document object.

HTML text, specified as a character vector.

Example: '<p><b>Hello</b> <i style="color:green">World</i></p>'

Output Arguments

expand all

HTML object with appended content, returned as an mlreportgen.dom.HTML object.


expand all

Create an HTML object from HTML text to use for a Microsoft® Word report.

import mlreportgen.dom.*;
rpt = Document('HTMLToWordReport','docx');     
htmlObj = addHTML(rpt,...
    '<p><b>Hello</b> <i style="color:green">World</i></p>');

Generate the Word report.


Introduced in R2015a

Was this topic helpful?