Export (0) Print
Expand All

CellMerge class

Vertically Merged/Split Table Cells. When the object is serialized out as xml, its qualified name is w:cellMerge.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class CellMerge : OpenXmlLeafElement

[ISO/IEC 29500-1 1st Edition]

cellMerge (Vertically Merged/Split Table Cells)

This element specifies that the vertical merge state of the parent table cell has been modified while revisions were being tracked for the document. The vmerge and vmergeOrig attributes on this element specify the original and revised vertical merge states of the table cell.

[Example: Consider a document with a two row by two columns table as follows:

If this table has the two cells in the second column merged into one and this modification is tracked as a revision, as follows:

The resulting WordprocessingML for the revision would appear as follows:

<w:tbl>
  …  <w:tr>
    <w:tc>
      <w:r>
        <w:t>One</w:t>
      </w:r>
    </w:tc>
    <w:tc>
      <w:r>
        <w:t>Two</w:t>
      </w:r>
    </w:tc>
  </w:tr>
  <w:tr>
    <w:tc>
      <w:r>
        <w:t>Three</w:t>
      </w:r>
    </w:tc>
    <w:tc>
      <w:tcPr>
        <w:cellMerge w:id="0" w:vMerge="cont"/>
      </w:tcPr>
      <w:r>
        <w:t>Four</w:t>
      </w:r>
    </w:tc>
  </w:tr>
</w:tbl>

The cellMerge element specifies that changes were made to the vertical merge settings of the last cell in the table, specifically; the cell was vertically merged with the cell above it (gaining a revised vmerge attribute value of cont). end example]

Parent Elements

tcPr (§17.7.6.8); tcPr (§17.7.6.9); tcPr (§17.4.70); tcPr (§17.4.71)

Attributes

Description

author (Annotation Author)

Specifies the author for an annotation within a WordprocessingML document.

If this attribute is omitted, then no author shall be associated with the parent annotation type.

[Example: Consider a comment represented using the following WordprocessingML fragment:

<… w:id="1" w:author="Example Author">
  …
</…>

The author attribute specifies that the author of the current annotation is Example Author, which can be used as desired. end example]

The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13).

date (Annotation Date)

Specifies the date information for an annotation within a WordprocessingML document. The use of this information is outside of the scope of /IEC 29500.

If this attribute is omitted, then no date information shall be associated with the parent annotation type.

[Example: Consider a comment represented using the following WordprocessingML fragment:

<… w:id="1" w:date="2006-01-01T10:00:00">
  …
</…>

The date attribute specifies that the date of the current annotation is January 1st 2006 at , which can be used as desired. end example]

The possible values for this attribute are defined by the ST_DateTime simple type (§17.18.9).

id (Annotation Identifier)

Specifies a unique identifier for an annotation within a WordprocessingML document. The restrictions on the id attribute, if any, are defined by the parent XML element.

If this attribute is omitted, then the document is non-conformant.

[Example: Consider an annotation represented using the following WordprocessingML fragment:

<… w:id="1" … >
  …
</…>

The id attribute specifies that the ID of the current annotation is 1. This value is used to uniquely identify this annotation within the document content. end example]

The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10).

vMerge (Revised Vertical Merge Setting)

Specifies the vertical merge setting which was applied to the parent table cell by this revision.

If this attribute is omitted, then no revised vertical merge setting is supplied for this revision (if neither this nor the vmergeOrig attribute is specified, the revision can be ignored).

[Example: Consider a two row by two column table in which the cells in the second column are merged, and this change is tracked as a revision. The annotation on the last cell in the table would appear as follows:

<w:tc>
  <w:tcPr>
    <w:cellMerge … w:vMerge="cont" />
  </w:tcPr>
  …</w:tc>

The vmerge attribute value of cont specifies that the revision on the table cell resulted in it being merged with the previous set of vertically merged cells above it (whether that was one cell or many). end example]

The possible values for this attribute are defined by the ST_AnnotationVMerge simple type (§17.18.1).

vMergeOrig (Vertical Merge Setting Removed by Revision)

Specifies the vertical merge setting which was removed from the parent table cell by this revision.

If this attribute is omitted, then the original vertical merge setting shall be assumed to be rest (not merged).

[Example: Consider a two row by two column table in which the merged cells in the second column are split, and this change is tracked as a revision. The annotation on the last cell in the table would appear as follows:

<w:tc>
  <w:tcPr>
    <w:cellMerge … w:vMergeOrig="cont" />
  </w:tcPr>
  …</w:tc>

The vmergeOrig attribute value of cont specifies that the revision on the table cell resulted in it having its vertical merge property removed. end example]

The possible values for this attribute are defined by the ST_AnnotationVMerge simple type (§17.18.1).

[Note: The W3C XML Schema definition of this element’s content model (CT_CellMergeTrackChange) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft