RECORDS / TERMS / THE NEXT APPOINTMENT

Extracting Tables from Documents

How table extraction from documents works, what Document AI parsers deliver, and how to check rows, columns and line items before the data enters your records.

8 min read1 viewsExtracting Tables from Documents
— · 0 votes
Contents
  1. What table extraction actually does
  2. How Document AI parsers find a table
  3. Rows and columns: keeping the grid intact
  4. Invoice line items as a test case
  5. Turning output into usable records
  6. Checking extracted tables before use
  7. Where manual handling still fits
  8. Fitting extraction into a vehicle record workflow
  9. Questions about extracting tables from documents
  10. What is document AI table extraction?
  11. Can a parser read tables that have no visible borders?
  12. Why do invoice line items fail to extract cleanly?
  13. What does structured data output look like?
  14. Should extracted tables be checked by hand?
  15. When does a specialist need to set up extraction?

Extracting tables from documents means turning the rows and columns printed on a page into structured data you can read, sort and store. A parser identifies the grid on the page, reads each cell and returns the values as machine-readable rows. The work suits invoice line items, service sheets and cost tables that would otherwise be retyped by hand.

  • A table extractor returns cell values with their row and column positions, not just a block of text.
  • Structured data output is only as good as the layout recognition behind it, so the grid must be found first.
  • Invoice line items are a demanding case because descriptions, quantities and amounts sit in separate cells.
  • Check a sample of extracted rows against the source page before the data feeds any record.
  • A layout the parser cannot resolve needs a person or a trained specialist, not a guess.

What table extraction actually does

Table extraction reads a document page and rebuilds each table as a grid of cells. The tool separates the table area from surrounding text, finds the lines or spacing that mark rows and columns, and assigns every value to a position. The result is structured data output that keeps the relationship between a label and the figure beside it.

A plain text extraction loses that relationship, because values arrive in reading order without their column headings. Table extraction keeps the headings attached, so a figure can be traced back to the column it belongs to. This matters when a document holds several tables with different column sets on the same page.

The output typically lists each row with its cells, plus an indication of where the table sat on the page. Some tools return the table as a nested structure with header rows flagged separately. That flag helps later steps know which row names the columns rather than holding a data value.

How Document AI parsers find a table

Document AI parsers combine layout analysis with text recognition to locate tables on a page. The parser first detects text regions, then looks for the alignment and ruling that suggest a grid. Ruled tables with visible borders are the easier case, because the lines give the parser a clear frame.

Tables without borders rely on spacing and alignment instead, which takes more careful analysis. Columns separated by consistent gaps can be inferred, though a wide description may spill into the next column. A parser that reports low confidence on a table is telling you the grid was uncertain rather than clean.

Merged cells, nested tables and tables that continue across pages test any parser. A table split over two pages may return as two tables that need joining on a shared key. Where the layout is complex, a trained specialist should review the setup rather than leaving the output unchecked.

Rows and columns: keeping the grid intact

Rows and columns carry the meaning of a table, so the extractor must keep each value in its correct cell. A shift of one column moves every figure in that row under the wrong heading. Checking a few rows against the page catches such shifts early.

Header rows need to be identified separately from data rows. When a table repeats its header on a new page, the parser should mark the repeat as a header rather than a line item. Otherwise a total or record count gains a row that holds only column names.

Empty cells also carry information and should stay empty rather than being filled or dropped. A missing quantity is different from a quantity of zero, and a record that confuses the two is wrong. Good structured data output preserves the gaps as gaps.

Invoice line items as a test case

Invoice line items show why table extraction needs care, because each row mixes a description with numbers. A line holds a part or service name, a quantity, a unit price and an amount, and each belongs in its own column. Retyping those rows is slow and invites transposition errors.

Descriptions often run to two lines while the numbers stay on the first. A parser must decide whether the second line continues the description or starts a new row. Getting this wrong merges two line items or splits one into two, and both distort the total.

Amounts and dates need consistent formatting before they enter a record. A figure read as text will not sum, and a date read in the wrong order will sort incorrectly. Normalizing those fields after extraction is part of the job, not an optional extra.

Turning output into usable records

Structured data output usually arrives as a table, a spreadsheet or a data format such as JSON. The format matters less than whether each cell keeps its row and column identity. A flat list of values without position is hard to reconcile with the source page.

Map the extracted columns to the fields in your own record before you import anything. A column called amount on the page may need to land in a cost field with a defined meaning. Doing the mapping once, in a fixed step, keeps later imports consistent.

Keep a link from each imported row back to the page it came from. When a figure looks wrong later, the source page settles the question quickly. That link also supports an audit of how a record was built.

Checking extracted tables before use

A check step compares a sample of extracted rows against the source page. Pick rows that include a long description, an empty cell and a value near a column edge. If those match, the rest of the table is likely sound, though a full check remains the safer route for high-value records.

Row counts offer a quick signal of trouble. A table with fewer extracted rows than the page shows has probably merged or dropped lines. A table with more rows than expected may have split a wrapped description into separate entries.

Totals give another check where the page shows one. Summing the extracted amount column and comparing it with the printed total exposes a misread figure. A mismatch means the table needs review before the data goes further.

Where manual handling still fits

Some documents defeat automated table extraction, and a person should take over. Handwritten tables, badly faded print and tables rebuilt with merged cells fall into this group. Sending such pages through a parser without review produces confident but wrong output.

A trained specialist should set up extraction for documents where an error carries real cost. The setup covers which page areas to read, how to treat headers and how to normalize fields. Once configured, the routine pages can run through the same path.

Manual entry remains valid for a small batch of irregular pages. The trade is time against certainty, and the choice depends on how many pages arrive and how much an error would matter. Mixing the two approaches is reasonable when the split is clear.

Fitting extraction into a vehicle record workflow

Vehicle records gather service notes, dates and everyday costs, and many of those details sit in tables. A service sheet lists parts and labor as line items, and a fuel log lists fills as rows. Extracting those tables puts the figures into a record without a second typing step.

Dates and costs from invoice line items can be filed against the right vehicle once a key links them. A registration or unit number on the page serves as that key when it appears in a consistent spot. Extraction must capture the key along with the table rows for the link to work.

The record stays useful when each figure can be traced to its source document. Storing the page reference beside the extracted row gives that trace. Over time the record becomes a set of tables that share a structure, which is easier to review and compare.

Questions about extracting tables from documents

What is document AI table extraction?

Document AI table extraction is the use of a parser to find tables on a page and return their cells as structured data. The parser locates the grid, reads each cell and keeps the row and column positions. The output can then feed a record, a spreadsheet or a data system without retyping.

Can a parser read tables that have no visible borders?

A parser can read borderless tables by inferring columns from spacing and alignment. The inference is less certain than with ruled tables, so wide descriptions may spill into a neighboring column. A low confidence mark on such a table signals that a person should check it.

Why do invoice line items fail to extract cleanly?

Invoice line items fail when a description wraps to a second line or a cell is merged across columns. The parser may treat the wrapped line as a new row, which splits one item into two. Checking row counts and the printed total exposes this kind of error.

What does structured data output look like?

Structured data output presents each table as rows of cells with their column positions kept. It may arrive as a spreadsheet, a data table or a format such as JSON. The key quality is that each value remains tied to its row and column.

Should extracted tables be checked by hand?

Extracted tables should be checked against the source page before they enter a record that matters. A sample covering a long description, an empty cell and an edge value gives a useful signal. A total that does not match the printed figure means the table needs a full review.

When does a specialist need to set up extraction?

A specialist should set up extraction when the documents are irregular or an error would carry real cost. The setup defines which page areas to read and how headers and fields are handled. Handwritten or badly faded tables also call for specialist review rather than automated output.

Latest articles