The easy assumption is that OCR on a picture of a table returns a list of cells, so a spreadsheet is one split on Tab away, or on whitespace if the Tabs look odd. In this test the counts did not support it. A work-order table with 34 filled cells came back as 40 text boxes. A price list with 63 cells came back as 58. Neither equals the number of cells, and they miss in opposite directions.

The text came from ImgIng https://imging.ai/ on its default tier, in a desktop browser on an Apple-silicon Mac, with both the TXT and the JSON exported. The seven sample tables are self-made with made-up data, clean and not tilted, one per kind, each recognised once. "Pasting" below means a small program that splits each line on Tab and fills a grid, not a real spreadsheet app.

A text box is a run of ink

Each entry in the JSON is a string plus four corner points. There is no row number and no column number in it, so nothing in the export says a grid exists. A cell is something a reader sees from ruling lines and alignment.

On four of the seven tables the two counts agreed: 63 boxes for 63 cells twice, 45 for 45, 42 for 42. So "boxes are cells" can look right on a clean table. It is not a rule, and equal counts do not prove the columns are right either: the bordered grade table had 63 boxes for 63 cells and still 60 misplaced cells in the simulated paste.

Wrapped cells give more boxes than cells

The work-order table is 7 rows by 5 columns with 34 non-empty cells, and six of them wrap onto a second line. The JSON had 40 boxes, which is 34 plus 6. Each text line is its own box, so a two-line cell is two boxes with nothing tying them together.

The TXT export has 7 lines, matching the 7 rows. But each line split into only 2 pieces on Tab, for 5 columns, and 0 of the 34 cells landed in the right place.

Uneven row spacing gave fewer boxes than cells

The price list is 9 rows by 7 columns, 63 cells. With even row heights the count was 63 boxes. With the same content and row heights varied between 44 and 96 px it was 58. The header labels 货号 (item number) and 品名 (product name) came back as one box reading 货号品名, and the three headers on the right came back as another one. Why vertical spacing would change which horizontal neighbours merge was not investigated, and there is only one table of this kind.

Why splitting on whitespace cannot fix either case

A merged header defeats a whitespace fallback directly, because inside 货号品名 there is no whitespace at all. The bordered grade table shows the same: its exported header is three Tab-separated labels followed by four headers written as one unbroken string. In the exports from this test a Tab appeared where the gap was wide, and a narrow gap became a space or nothing. Whether other table-OCR tools behave the same was not tried. On the borderless price list the nine lines split into 6, 2, 5, 4, 5, 3, 5, 4 and 5 pieces for a 7-column table.

The wrapped case fails from the other side. Both lines of a wrapped cell end up on the same output line, and no character says which pieces belong together.

The corner points are the way out. Boxes can be grouped into rows by centre y, and column gaps looked for where at least 80% of the rows are empty. The minimum gap width was picked after seeing results: 0.4 of the box height merged two columns on the borderless price list, 0.2 did not. With that, the bordered and borderless tables came out with 0 misplaced cells. The wrapped table still had 4 misplaced with borders and 11 without. The uneven one stayed at 63 of 63, because the merged box leaves a column gap of only 4 px. Cutting along ruling lines, which only works when lines exist, found 35 cells on the wrapped table and placed everything correctly. This test found no rule that joins wrapped lines correctly on the borderless version.

A cheap check before pasting is to count the boxes against the cells the table should have. If the numbers differ, the columns have to come from lines or gaps in the image, not from whitespace.