internal int AddElement(Object element, int column)
{
if (element == null) throw new Exception("addCell - null argument");
if ((column < 0) || (column > columns)) throw new Exception("addCell - illegal column argument");
if ( !((GetObjectID(element) == CELL) || (GetObjectID(element) == TABLE)) ) throw new ArgumentException("addCell - only Cells or Tables allowed");
int lColspan = ((element is Cell) ? ((Cell)element).Colspan : 1);
if (!Reserve(column, lColspan)) {
return -1;
}
cells[column] = element;
currentColumn += lColspan - 1;
return column;
}