"The columns shifted" can mean two unrelated things, and a field count per line separated them in these samples. If the file has the right number of lines but uneven fields per line, the table was cut in the wrong places. If the line count itself is wrong, cells were written out without escaping. The numbers below come from one run on 2026-11-20 with seven self-made sample tables, fictional data, clean and unskewed, one sheet per layout type. "Paste" throughout means a program splitting each line on Tab, not a real spreadsheet.
The text and the line count were both right
The recognition step used ImgIng https://imging.ai/ image text recognition at its default tier, in a desktop browser on an Apple-silicon Mac, exporting a TXT and a JSON with a four-corner polygon for every text box. Across the seven sheets, all 356 cell text segments appeared verbatim in the output, and every sheet came back with the right number of lines. What was wrong was where the Tabs sat. Splitting on Tab left 60 of 63 cells misplaced on a fully ruled grade sheet and 60 of 63 on a borderless quote sheet, so ruling lines did not help.
Uneven field counts point at segmentation
The borderless quote sheet is 9 rows by 7 columns, and its TXT export has 9 lines. The Tab-separated field counts per line, sorted rather than in line order, are 2, 3, 4, 4, 5, 5, 5, 5, 6. No line reaches 7. On the ruled grade sheet each data row had exactly one Tab, with student number, name and ID in one field and the scores in the other.
A Tab at the wide gaps and a space or nothing at the narrow ones is what an exporter would produce if it turns detected text boxes back into lines by spacing. That is an inference from the output; how this tool's layout step picks where a Tab goes is not visible from outside. The JSON does allow redoing the cut. Rebuilding rows and columns from the box coordinates brought the ruled, borderless and side-by-side sheets to 0 misplaced cells, with 7 fields on all 9 lines of the quote sheet. The column-gap threshold for that rebuild was tuned after looking at results, and it is touchy: at 0.4 times the box height the quote sheet collapsed to 6 columns and 0 of 63 correct, at 0.2 times it was 63 of 63.
A changed line count points at serialization
The second failure needs no OCR at all. Take a table whose columns are already correct: a fictional work-order sheet, 8 rows by 5 columns, 39 non-empty cells. Six cells hold two lines of text, and one added row has a cell starting with a double quote and a cell containing a Tab. Write it naively, in-cell newlines and Tabs emitted as they are, and it reads back as 14 lines with field counts 5, 2, 4, 5, 1, 2, 4, 2, 4, 1, 5, 2, 4, 6. Only 6 of 39 cells land where they belong.
One fix is to wrap any cell containing a newline, a Tab or a quote in double quotes and double the quotes inside it. Its first four physical lines, Tabs made visible:
$ head -4 quoted.tsv | perl -pe 's/\t/<TAB>/g' 工单号<TAB>问题描述<TAB>处理人<TAB>状态<TAB>备注 W0031<TAB>"打印机卡纸 三楼东侧"<TAB>周工<TAB>已完成<TAB>更换搓纸轮 W0032<TAB>会议室投影无信号<TAB>林工<TAB>处理中<TAB>"待采购 Lines 2 and 3 are one record: the description cell opens a quote on line 2, holds a real newline, and closes on line 3 before the last three fields. Line 4 stops right after a notes cell opens its quote, because head counts physical lines and knows nothing about quoting. The quoted file still has 14 physical lines, the same as the naive one.
Quoting only works when the reader honors quotes
Read with a quote-aware parser, Python's csv module with the excel-tab dialect, the quoted file comes back as 8 rows of 5 fields and 39 of 39 cells. Split on Tab line by line, it is 14 lines and 6 of 39 again. The cheaper alternative, flattening in-cell newlines and Tabs to spaces, gives 8 clean lines and 39 of 39 under a plain split. Under the quote-aware reader it scores 38 of 39, because the cell that begins with a literal " is taken as a quoted cell and loses its quote.
On these samples every misplaced cell in the OCR exports was the first kind. The exports contained no in-cell newlines, which is why their line counts were right.
Real spreadsheets were not part of the run
The read-back used a parser, not Excel, Numbers or WPS, so pasting a quoted multi-line cell into them was not checked. A sheet with both problems at once was not built, so how the fingerprints combine is unknown.

