User`s guide
mlreportgen.dom.DOCXRawFormat class
12-103
For information about XML markup for Word formats, see http://officeopenxml.com/
anatomyofOOXML.php.
Tag — Tag for document element
string
Tag for document element, specified as a string.
A session-unique ID is generated as part of document element creation. The generated
tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value
of the Id property of the object. You can specify a tag to replace the generated tag.
Specify your own tag value, for example, to make it easier to identify where an issue
occurred during document generation.
Examples
Turn on Line Numbering Based on Default DOM Template
In this example, the RawFormats property of a DOCXSection is initialized with the
markup for properties specified by the default template. This code appends the line
numbering property to the existing properties.
import mlreportgen.dom.*;
d = Document('myreport','docx');
open(d);
s = d.CurrentDOCXSection;
s.RawFormats = [s.RawFormats ...
{'<w:lnNumType w:countBy="1" w:start="1" w:restart="newSection"/>'}];
append(d,'This document has line numbers');
close(d);
rptview('myreport','docx');
See Also
mlreportgen.dom.DOCXSection
More About
• “Report Formatting Approaches”