mlreportgen.dom.Template class
Package: mlreportgen.dom
Superclasses: mlreportgen.dom.Document
Create report template object
Description
Use mlreportgen.dom.Template
objects to create report templates.
For example, you can append DOM content, such as Text
,
Paragraph
, or Image
objects, and
TemplateHole
objects to a Template
object to
create a template containing fixed content with holes for generated content.
Note
Word for Mac does not support creating holes for DOM API templates. If you need to
create a Word template for generating Word documents on a Mac, you can create a
template using the DOM API. Create a Template
object and use
mlreportgen.dom.TemplateHole
to add
holes. Alternatively, use Microsoft® Word to create your template and copy the template to your Mac.
The mlreportgen.dom.Template
class is a handle
class.
Creation
Description
creates
a template object and sets the TemplatePath
property to templateObj
= Template()Untitled.htmtx
.
creates a template object and sets the TemplatePath
property to templateObj
= Template(templatePath
)templatePath
. If
templatePath
does not include a file extension, the
Type property is set
to the default value, HTML.
also sets the Type property to
templateObj
= Template(templatePath
,fileType
)fileType
. If templatePath
includes a file extension, then fileType
must match the
file extension specified by templatePath
.
creates a template object based on the template specified by
templateObj
= Template(templatePath
,fileType
,sourceTemplatePath
)sourceTemplatePath
.
Input Arguments
Properties
Methods
Examples
Version History
Introduced in R2014b