Skip to content

OCR Extract Table

Type: ocr-extract-table  ·  Package: OCR Activities v1.0.0  ·  Output: DataTable

Detects a table within an image, grouping the recognized words into rows and columns based on their position, and returns it as a DataTable. Useful for extracting a tabular list from a scanned document (an invoice detail, a data table).

Run OCR on the image and, based on the coordinates of each word, reconstruct the structure of the table. By default it treats the first row as headers (hasHeader) and discards rows with fewer cells than minColumns (to ignore loose text that is not part of the table).

ParameterEditorDescription
pathexpressionImage file path.
ParameterEditorDescription
languageexpressionLanguage code: eng (def.) · spa · eng+spa.
preprocessexpressionLimpieza previa: none · auto (def.) · deskew · binarize.
hasHeaderbooleanTreat the first row as column names. By default true.
minColumnsexpressionDiscard rows with fewer cells than this number. By default 2.

Returns a DataTable with the detected rows and columns.

OCR Extract Table path = = rutaEscaneo language = "spa" → output: tabla
For Each items = = tabla itemVariable = fila
└─ activities:
Log message = = str(row["Description"]) + " — " + str(row["Value"])
  • OCR Get Lines — raw lines and coordinates, for fine control.
  • DataTable — filter, sort and summarize the extracted table.
  • PDF Get Text — for documents with real text.