docx
    Preparing search index...

    Class TableRow

    Represents a table row in a WordprocessingML document.

    A table row is a single row of cells within a table. Each row contains one or more table cells that hold the actual content.

    Reference: http://officeopenxml.com/WPtableRow.php

    <xsd:complexType name="CT_Row">
    <xsd:sequence>
    <xsd:element name="tblPrEx" type="CT_TblPrEx" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="trPr" type="CT_TrPr" minOccurs="0" maxOccurs="1"/>
    <xsd:group ref="EG_ContentCellContent" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="rsidRPr" type="ST_LongHexNumber"/>
    <xsd:attribute name="rsidR" type="ST_LongHexNumber"/>
    <xsd:attribute name="rsidDel" type="ST_LongHexNumber"/>
    <xsd:attribute name="rsidTr" type="ST_LongHexNumber"/>
    </xsd:complexType>
    new TableRow({
    children: [
    new TableCell({ children: [new Paragraph("Cell 1")] }),
    new TableCell({ children: [new Paragraph("Cell 2")] }),
    ],
    });

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    Methods

    • Parameters

      • columnIndex: number
      • allowEndNewCell: boolean = false

      Returns number

    • Prepares this component and its children for XML serialization.

      This method is called by the Formatter to convert the component tree into an object structure compatible with the xml library (https://www.npmjs.com/package/xml). It recursively processes all children and handles special cases like attribute-only elements and empty elements.

      The method can be overridden by subclasses to customize XML representation or execute side effects during serialization (e.g., creating relationships).

      Parameters

      • context: IContext

        The serialization context containing document state

      Returns IXmlableObject | undefined

      The XML-serializable object, or undefined to exclude from output

      // Override to add custom serialization logic
      prepForXml(context: IContext): IXmlableObject | undefined {
      // Custom logic here
      return super.prepForXml(context);
      }