OCR Extract Table
OCR Extract Table
Section titled “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).
How it works
Section titled “How it works”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).
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
path | expression | Image file path. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
language | expression | Language code: eng (def.) · spa · eng+spa. |
preprocess | expression | Limpieza previa: none · auto (def.) · deskew · binarize. |
hasHeader | boolean | Treat the first row as column names. By default true. |
minColumns | expression | Discard rows with fewer cells than this number. By default 2. |
Output
Section titled “Output”Returns a DataTable with the detected rows and columns.
Example
Section titled “Example”OCR Extract Table path = = rutaEscaneo language = "spa" → output: tablaFor Each items = = tabla itemVariable = fila └─ activities: Log message = = str(row["Description"]) + " — " + str(row["Value"])Related activities
Section titled “Related activities”- 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.