clone

構文

clonedContainer = clone(sourceContainer)

Description

clonedContainer = clone(sourceContainer) copies (clones) the specified container.

入力引数

すべて展開する

Container object to copy, specified as an mlreportgen.dom.Container object.

Output Arguments

すべて展開する

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).

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);

R2015a で導入