主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

mlreportgen.dom.PageRawFormat 类

命名空间: mlreportgen.dom

Microsoft Word 格式数组的 XML 标记

描述

Microsoft® Word 格式数组的 XML 标记。

mlreportgen.dom.PageRawFormat 类是一个 handle 类。

创建对象

描述

RawFormatObj = PageRawFormat 创建一个空的原始格式数组。

示例

属性

全部展开

目标标识符,指定为字符向量或字符串标量。DOM API 在创建文档元素对象时会生成一个会话唯一标识符。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

数据类型: char | string

指定一个字符向量元胞数组。每个字符向量都包含 Word 格式的 Word XML 标记。

有关 Word 格式的 XML 标记的信息,请参阅 https://ecma-international.org/publications-and-standards/standards/ecma-376/

标记,指定为字符向量或字符串标量。DOM API 在创建此对象的过程中生成一个会话唯一标记。生成的标记形式为 CLASS:ID,其中 CLASS 是对象类,ID 是对象的 Id 属性的值。使用此值来帮助确定在文档生成过程中出现的问题的位置。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

数据类型: char | string

示例

全部折叠

在此示例中,RawFormats 对象的 CurrentPageLayout 属性使用默认模板指定的属性标记进行初始化。此代码将行号属性追加到现有属性。

import mlreportgen.dom.*;
d = Document('myreport','docx');
open(d);

s = d.CurrentPageLayout;
s.RawFormats = [s.RawFormats ...
{'<w:lnNumType w:countBy="1" w:start="0" w:restart="newSection"/>'}];
p = Paragraph('This document has line numbers');
append(d,'This document has line numbers');
append(d,clone(p));

close(d);
rptview(d.OutputPath);

版本历史记录

在 R2016a 中推出