User`s guide
mlreportgen.dom.Document.createTemplate
11-27
Input Arguments
path — Path for new template
string
If you use the path argument without the type argument, for a Word template, include
the .dotx extension and for an HTML template, include the .htmx extension.
If you use both the path and type arguments, and path does not have an extension, the
createTemplate method appends the appropriate extension (.dotx or .htmx).
type — Type of output
'html' (default) | 'docx' | 'html-file'
Type of output, specified as 'html', 'docx' or 'html-file'.
• 'html'— HTML output HTML output as a zipped or unzipped folder containing the
HTML document text, image, style sheet, and JavaScript files
• 'docx'— Word output
• 'html-file'— HTML output consisting of a single file that contains the text, style
sheets, JavaScript®, and images for the report
If you specify a template using the path argument, the template must be consistent with
the type argument. You must specify a Word template (.dotx) for Word output, an
HTML template package (.htmtx) for HTML output, and a single-file HTML template
(.html) for html-file output.
More About
Tips
Invoke createTemplate on the mlreportgne.dom.Document class itself, but not
on an instance of that class. In other words, use Document.createTemplate, not
myDocument.createTemplate (where myDocument is a derived class of Document).
See Also
mlreportgen.dom.Document | mlreportgen.dom.Template | unzipTemplate |
zipTemplate