Documentation

This is machine translation

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

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

append

Class: mlreportgen.dom.Container
Package: mlreportgen.dom

Append DOM object to container

Syntax

domObjOut = append(containerObj,domObj)

Description

domObjOut = append(containerObj,domObj) appends the DOM object to the specified container object.

Input Arguments

expand all

Container object to append DOM object to, specified as an mlreportgen.dom.Container object.

DOM document element object to append, specified as a DOM object.

  • mlreportgen.dom.CustomElement

  • mlreportgen.dom.Container

  • mlreportgen.dom.DocumentPart

  • mlreportgen.dom.FormalTable

  • mlreportgen.dom.Group

  • mlreportgen.dom.ExternalLink

  • mlreportgen.dom.HTML

  • mlreportgen.dom.HTMLFile

  • mlreportgen.dom.Image

  • mlreportgen.dom.InternalLink

  • mlreportgen.dom.LinkTarget

  • mlreportgen.dom.OrderedList

  • mlreportgen.dom.Paragraph

  • mlreportgen.dom.RawText

  • mlreportgen.dom.Table

  • mlreportgen.dom.Text

  • mlreportgen.dom.TemplateHole

  • mlreportgen.dom.UnorderedList

Output Arguments

expand all

Appended document element, returned by one of these DOM objects:

  • mlreportgen.dom.CustomElement

  • mlreportgen.dom.Container

  • mlreportgen.dom.DocumentPart

  • mlreportgen.dom.FormalTable

  • mlreportgen.dom.Group

  • mlreportgen.dom.ExternalLink

  • mlreportgen.dom.HTML

  • mlreportgen.dom.HTMLFile

  • mlreportgen.dom.Image

  • mlreportgen.dom.InternalLink

  • mlreportgen.dom.LinkTarget

  • mlreportgen.dom.OrderedList

  • mlreportgen.dom.Paragraph

  • mlreportgen.dom.RawText

  • mlreportgen.dom.Table

  • mlreportgen.dom.Text

  • mlreportgen.dom.TemplateHole

  • mlreportgen.dom.UnorderedList

Examples

expand all

Create a container object.

import mlreportgen.dom.*;
rpt = Document('MyReport','docx');
 
c = Container();

Append content to the container and append the container to the report.

append(c,Paragraph('Hello'));
append(c,Table(magic(5)));
append(rpt,c);

Close and generate the report.

close(rpt);      
rptview(rpt.OutputPath);

Introduced in R2015a

Was this topic helpful?