Programmer's Guide > Interfaces > ANode interface > insertTable method
  
insertTable method
Insert a table as a child of this Node.
insertTable(tableModel, wrapperTag, colCount, rowCount [, refChild])
Parameters
StringtableModel
The name of the table model for the table to be inserted. Valid table model names are available from the tableModels attribute of the ADocumentType interface.
StringwrapperTag
The name of the wrapper tag to insert around the table. Valid wrapper tag names for a given table model in a given document are available from the tableModelWrappers method in the ADocumentType interface. If a null string is passed, the wrapper tag will be chosen randomly.
unsigned longcolCount
The number of columns in the table.
unsigned longrowCount
The number of rows in the table.
NoderefChild
[optional] The Node before which the table is inserted. This must be a child of this node. If this parameter is null, the table will be inserted after the last child of this node.
Returns
TableSet. The TableSet inserted in the document.
Throws
TableException
INVALID_PARAMETER_ERR: Raised if the wrapper tag or table model name is not valid.
INVALID_INDEX_ERR: Raised if column or row count is invalid.
DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised if the node cannot be changed.
HIERARCHY_REQUEST_ERR: Raised if a table is not allowed in this context.
NOT_FOUND_ERR: Raised if refChild is not a child of this node.