Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/docxml/src/utilities/tables.ts>TableGridModel

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
class TableGridModel
import { TableGridModel } from "https://deno.land/x/docxml@2.4.1/src/utilities/tables.ts";

A conceptual description of the table that makes it easier to reason about it.

Constructors

new
TableGridModel(table: Table)

Properties

private
readonly
cellNodes: Map<Cell, CellInfo>

The coordinate and size information about a cell.

private
readonly
occupation: Map<CellCoordinate, Cell>

A map of which col/row coordinates are filled by a cell.

Methods

Return the zero-based column number of the first unfilled cell on the given row

getCellInfo(cell: Cell): CellInfo

Return the position and spanning of a given node, keeping all colspans/rowspans of other cels into account.

getCellsInRow(row: number)

Get the number of columns in a row, even if some cells span multiple columns.

getNodeAtCell(column: number, row: number)

Return the node belonging to this column/row coordinate, taking all colspans/rowspans into account.