> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TableCells Object (ITableCells Interface)

All cells of a table block form a single collection represented by TableCells object. Besides the standard collection functionality, this object contains methods for merging and splitting groups of table cells and method for finding table cell index in collection by its position in a base table grid. The collection is accessible via the [TableBlock](/fine-reader/engine/api-reference/layout-related-objects/tableblock) object.

* The indexing of ABBYY FineReader Engine collections starts with 0.
* The foreach statement in C# (for each in Visual Basic .NET) can be used to manipulate the collection.

## Properties

| Name                                                                                                                  | Type                                                                                                                                                                                                              | Description                                            |
| --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| Application                                                                                                           | [Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface), [read-only](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties)     | Returns the Engine object.                             |
| Count                                                                                                                 | [int](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties), read-only                                                                                                 | Stores the number of elements in the collection.       |
| [Element](/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/element-property) | [TableCell](/fine-reader/engine/api-reference/layout-related-objects/tablecell), [read-only](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties) | Provides access to a single element of the collection. |

## Methods

| Name                                                                                                          | Description                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IndexOf](/fine-reader/engine/api-reference/layout-related-objects/tablecells/indexof-method)                 | Returns an index of the cell that corresponds to the specified point in base coordinates. This method may be useful if you want to obtain indices of all cells from one row or column. |
| [Item](/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/item-method) | Provides access to a single element of the collection.                                                                                                                                 |
| [Merge](/fine-reader/engine/api-reference/layout-related-objects/tablecells/merge-method)                     | Merges a group of cells inside the specified rectangle.                                                                                                                                |
| [Split](/fine-reader/engine/api-reference/layout-related-objects/tablecells/split-method)                     | Splits a group of cells inside the specified rectangle.                                                                                                                                |

## Related objects

<img src="https://mintcdn.com/abbyy/i-EfCQVmseNiPQcp/images/fine-reader/engine/tablecells.gif?s=93258c2b3685bf25b2e467174cda13d0" alt="TableCells" width="122" height="84" data-path="images/fine-reader/engine/tablecells.gif" />[](/fine-reader/engine/api-reference/layout-related-objects/tableblock#cells)[](/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/element-property)[](/fine-reader/engine/api-reference/layout-related-objects/tablecell)[](/fine-reader/engine/api-reference/layout-related-objects/tableblock)

[Object Diagram](/fine-reader/engine/api-reference/object-diagram)

## Samples

<Accordion title="C# code">
  ```csharp theme={null}
  FREngine.IBlock block;
  // Retrieving table cells
  if (block.Type == FREngine.BlockTypeEnum.BT_Table)
  {
   FREngine.ITableBlock tableBlock = block.GetAsTableBlock();
   for( int iCell = 0; iCell < tableBlock.Cells.Count; iCell++ ) {
    FREngine.ITableCell cell = tableBlock.Cells[iCell];
    // do something with the cell
   }
  }
  ```
</Accordion>

The object is used in the following code samples:

Windows: [RecognizedTextProcessing](/fine-reader/engine/guided-tour/samples#recognizedtextprocessing); and demo tools: [Engine Predefined Processing Profiles](/fine-reader/engine/guided-tour/samples#engine_predefined_processing_profiles).

## See also

[TableBlock](/fine-reader/engine/api-reference/layout-related-objects/tableblock)

[TableCell](/fine-reader/engine/api-reference/layout-related-objects/tablecell)

[Working with Layout and Blocks](/fine-reader/engine/guided-tour/advanced-techniques/working-with-layout-and-blocks)

[Working with Text](/fine-reader/engine/guided-tour/advanced-techniques/working-with-text)

[Working with Collections](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-collections)

[Working with Properties](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)
