Class: mlreportgen.dom.Container Package: mlreportgen.dom
Copy container object
clonedContainer = clone(sourceContainer)
clonedContainer = clone(sourceContainer) copies (clones) the specified container.
clonedContainer
sourceContainer
expand all
mlreportgen.dom.Container
Container object to copy, specified as an mlreportgen.dom.Container object.
Copied container object, returned as an mlreportgen.dom.Container object.
Create a container object. Microsoft® Word output ignores the HTML container element tag (in this example, the div tag).
div
import mlreportgen.dom.*; rpt = Document('MyReport','docx'); c = Container();
Color all of the text in this container red.
c.Style = {Color('red')};
Append content to the container and append the container to the report.
append(c,Paragraph('Hello')); append(c,Table(magic(5))); append(rpt,c);
Clone the container.
clonedC = clone(c);
Append the cloned container to the report.
append(rpt,clonedC);
Close and generate the report.
close(rpt); rptview(rpt.OutputPath);
mlreportgen.dom.Container | mlreportgen.dom.Group
mlreportgen.dom.Group