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.HTMLFile
Package: mlreportgen.dom

Append HTML to HTMLFile object


htmlObjOut = append(htmlFileObj,htmlText)
htmlObjOut = append(htmlFileObj,htmlObjToAppend)


htmlObjOut = append(htmlFileObj,htmlText) converts HTML string into an HTML object and appends the object to htmlFileObj.

htmlObjOut = append(htmlFileObj,htmlObjToAppend) appends the htmlObjToAppend object to htmlFileObj.

Input Arguments

expand all

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

HTML text, specified as a character vector.

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

HTML object to append, specified as an mlreportgen.dom.HTML object.

HTMLFile object to append, specified as an mlreportgen.dom.HTMLFile object.

Output Arguments

expand all

HTML content appended to an HTMLFile object, returned as an mlreportgen.dom.HTML object.


expand all

This example assumes that there is an HTML file called myHTMLfile.html in the MATLAB® current folder.

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

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

Append content to the HTMLFile object and append the HTMLFile object to the document.

append(htmlFileObj,'<p>This is <u>me</u> speaking</p>');

Generate the report.


Introduced in R2015a

Was this topic helpful?