> ## 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.

# TableBlock Object (ITableBlock Interface)

This object provides access to specific properties of a table block. The ITableBlock interface is derived from the [IBlock](/fine-reader/engine/api-reference/layout-related-objects/block) interface and inherits all its properties.

The region of blocks of this type may consist of one rectangle only. The structure of the table is described by two collections of table separators, horizontal and vertical (the HSeparators and VSeparators properties), and a collection of table cells (the Cells property). Each table cell is treated as a block of some type. The number of rows (columns) in the table is equal to the number of horizontal (vertical) separators minus 1.

The recognized text is a property of a single cell, not of the entire table. To access the recognized text of a table block, you should do the following:

1. Obtain the collection of table cells using the Cells property.
2. Select the desired cell. Use the methods of the [TableCells](/fine-reader/engine/api-reference/layout-related-objects/tablecells) object.
3. Obtain the block object of the cell (the [ITableCell::Block](/fine-reader/engine/api-reference/layout-related-objects/tablecell#block) property).
4. Check that the block is of the type [BT\_Text](/fine-reader/engine/api-reference/enumerations/blocktypeenum) (the [IBlock::Type](/fine-reader/engine/api-reference/layout-related-objects/block#type) property) and receive the [TextBlock](/fine-reader/engine/api-reference/layout-related-objects/textblock) object using the [IBlock::GetAsTextBlock](/fine-reader/engine/api-reference/layout-related-objects/block/getastextblock-method) method.
5. Use the [ITextBlock::Text](/fine-reader/engine/api-reference/layout-related-objects/textblock#text) property.

## Properties

| Name        | Type                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                              |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Cells       | [TableCells](/fine-reader/engine/api-reference/layout-related-objects/tablecells), [read-only](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties)           | Provides access to the cells collection of the table block. The collection always contains at least one cell, even if there are no table separators in the table. The cells in the collection are arranged in the logical reading order. |
| HSeparators | [TableSeparators](/fine-reader/engine/api-reference/layout-related-objects/tableseparators), [read-only](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties) | Provides access to horizontal separators collection of the table block. This collection always contains at least two separators corresponding to the table block top and bottom.                                                         |
| VSeparators | [TableSeparators](/fine-reader/engine/api-reference/layout-related-objects/tableseparators), [read-only](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties) | Provides access to vertical separators collection of the table block. This collection always contains at least two separators corresponding to the table block left and right borders.                                                   |

## Methods

| Name                                                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FindBaseCellFromPoint](/fine-reader/engine/api-reference/layout-related-objects/tableblock/findbasecellfrompoint-method) | Allows you to find cell position in the base grid from the pixel on image. By the base grid here we assume the grid formed by table borders and separators. Each vertical separator increments the horizontal coordinate by one, and each horizontal separator increments the vertical coordinate by one. Coordinate axes are oriented from left to right and from top to bottom. |
| [InitializeGrid](/fine-reader/engine/api-reference/layout-related-objects/tableblock/initializegrid-method)               | Initializes table grid for the table block.                                                                                                                                                                                                                                                                                                                                       |

## Related objects

### Windows

<img src="https://mintcdn.com/abbyy/i-EfCQVmseNiPQcp/images/fine-reader/engine/tableblock.gif?s=58ed60e146988ae96fdc7b795c4808b7" alt="TableBlock" width="385" height="237" data-path="images/fine-reader/engine/tableblock.gif" />[](/fine-reader/engine/api-reference/layout-related-objects/layout#visualblocks)[](/fine-reader/engine/api-reference/layout-related-objects/layout#blocks)[](/fine-reader/engine/api-reference/layout-related-objects/tablecell)[](/fine-reader/engine/api-reference/layout-related-objects/tablecells)[](/fine-reader/engine/api-reference/layout-related-objects/tableseparator)[](/fine-reader/engine/api-reference/layout-related-objects/tableseparators)[](/fine-reader/engine/api-reference/layout-related-objects/tableseparator)[](/fine-reader/engine/api-reference/layout-related-objects/tableseparators)[](/fine-reader/engine/api-reference/supplementary-objects-and-methods/region)[](/fine-reader/engine/api-reference/layout-related-objects/block)[](/fine-reader/engine/api-reference/layout-related-objects/layoutblocks)[](/fine-reader/engine/api-reference/layout-related-objects/layout)

### Linux and macOS

<img src="https://mintcdn.com/abbyy/i-EfCQVmseNiPQcp/images/fine-reader/engine/tableblocklinuxmac.gif?s=8af6f914db743ebb827f7de35dabab4e" alt="TableBlockLinuxMac" width="385" height="240" data-path="images/fine-reader/engine/tableblocklinuxmac.gif" />[](/fine-reader/engine/api-reference/layout-related-objects/tablecell)[](/fine-reader/engine/api-reference/layout-related-objects/tablecells)[](/fine-reader/engine/api-reference/layout-related-objects/tableseparator)[](/fine-reader/engine/api-reference/layout-related-objects/tableseparator)[](/fine-reader/engine/api-reference/layout-related-objects/tableseparators)[](/fine-reader/engine/api-reference/layout-related-objects/tableseparators)[](/fine-reader/engine/api-reference/supplementary-objects-and-methods/region)[](/fine-reader/engine/api-reference/layout-related-objects/layout#blocks)[](/fine-reader/engine/api-reference/layout-related-objects/block)[](/fine-reader/engine/api-reference/layout-related-objects/layoutblocks)[](/fine-reader/engine/api-reference/layout-related-objects/layout)

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

## Output parameter

This object is the output parameter of the [GetAsTableBlock](/fine-reader/engine/api-reference/layout-related-objects/block/getastableblock-method) method of the [Block](/fine-reader/engine/api-reference/layout-related-objects/block) object.

## Samples

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

[Block](/fine-reader/engine/api-reference/layout-related-objects/block)

[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 Properties](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)
