Documents & OCRPractical guides

PDF to Excel columns shifted? Check three records, blanks and line breaks

When PDF-to-Excel columns shift, compare each value with its field on the original page before repairing blanks, minus signs or continuation lines. Do not shift every short row left or rely only on totals. Three complete records and a reference total of 200 show how offsetting errors can escape detection.

white printing paper with numbers
Illustrative photo: Mika Baumeister · Unsplash License

What changed: Rebuilt the three-record review with complete fields, a reference total of 200, offsetting row errors and decisions for blanks, signs, repeated headers and failed extraction.

The practical answer

Confirm that the PDF has extractable text, convert one sample page with PDF to Excel, and inspect ID, quantity, amount and note against the original. This entry groups text by position and creates a sheet per page; it does not recover formulas or business table semantics. Scans require OCR or an original spreadsheet.

Selectable text does not guarantee a reconstructed table

PDF.js documentation for text items describes strings, transformation matrices, widths and line-break information. KitNelo organizes these positioned text items. This helps explain why one visible cell may contain several fragments; it does not establish accurate extraction for every table.

The converter groups nearby vertical positions into rows and uses horizontal positions and gaps to form cells. Headers and footnotes may become rows. Wrapped notes can occupy multiple rows, while a blank cell may have no text item. Treat the workbook as data awaiting review.

Choose a page containing headings, ordinary records and a long note. For image-only pages, review the scanned PDF text-layer workflow. An existing text layer may still contain OCR mistakes, especially in decimal points, minus signs and identifiers.

Classify the source before converting

Selectable text table

Try extraction, then compare every column with the source.

Image-only scan

Use OCR or manual entry. This converter does not reconstruct tables from images.

Multiple columns, merged cells or page-spanning tables

Prefer the original XLSX/CSV. Otherwise plan manual cleanup and review.

Three complete records: establish the answers before reviewing output

Assume the original page contains the records below, in ID, quantity, amount and note order. These are constructed review materials, not a measured PDF conversion. A02 has a genuinely blank note and a negative amount. The A03 note wraps over two lines on the page while remaining one business record.

Expect three records, quantity 2+1+3=6 and amount 120.50−10.00+89.50=200.00. Keep all three references. Quantity and amount have different units; do not multiply them unless the source explicitly defines the amount as a unit price.

Complete fictional source records; “blank” describes an empty cell
IDQuantityAmountNote
A012120.50Send sample first
A021-10.00blank
A03389.50Line 1: call before delivery; line 2: arrive in afternoon

A correct total can still assign money to the wrong record

Correct ownership

A01 → 120.50 A02 → -10.00 A03 → 89.50 Total 200.00

Incorrect ownership: two amounts swapped

A01 → 89.50 A02 → -10.00 A03 → 120.50 Still totals 200.00

Both the count and total pass, but A01 and A03 are individually wrong. Match each ID to the source page; a total cannot establish field ownership.

Repair a one-page sample before expanding the job

  1. Retain the PDF and record its file name and actual file-page position. Extract a sample page with ordinary rows, a blank note and a wrapped note. Printed page numbers may differ from software page positions.
  2. In Excel tools, select PDF to Excel and convert the sample. Open the downloaded XLSX and compare the four fields against the page. Successfully opening a workbook does not complete the review.
  3. Leave the A02 note empty and retain its minus sign with the amount. Reattach the A03 continuation only when page position and meaning establish that it belongs to that note; record the change.
  4. Check fields, record count and totals before processing the full document. Identify repeated headers and subtotals before combining page sheets. Do not count a header as a transaction or sum page subtotals alongside their detail rows.
  5. Pause if IDs cannot be paired reliably with amounts, only images are available, or multiple columns interleave. Obtain the original XLSX/CSV or arrange manual entry and review. Repeating extraction does not create missing business evidence.

Passing one reviewed page does not validate the others. Inspect their layouts and exceptions, with record-level review where the delivery requires it.

Diagnose the symptom before moving cells

Retain raw extraction and corrected sheets. Log file page, ID, original value, revised value, reason and reviewer. Leave ambiguous fields unresolved instead of guessing. Losing the A02 minus sign changes the total to 220; swapping A01 and A03 amounts leaves it at 200. Those symptoms require different checks.

If exporting onward to CSV or JSON, repeat the quote, blank and ID checks so type inference does not damage corrected data. For scans, see searchable PDF text and OCR.

Encrypted or malformed PDFs may fail, and this entry does not bypass passwords. Browser resources also constrain large files. An empty workbook or incomplete records are not a reliable delivery when usable text could not be obtained.

Symptoms, source evidence and checks after correction
SymptomInspect on the pageVerify after repair
Amount appears in the note columnHorizontal positions, blank fields and header meaningsMatch amounts by ID; do not shift all rows left
A02 becomes +10A separated minus sign or OCR mistakeRestore −10 and total 200
A03 becomes two recordsWhether the continuation belongs to its noteThree business records with the complete note
Amounts double after combining pagesDetail rows counted together with subtotalsDocument exclusions and reconcile each page

Common questions

Can this recover the original Excel formulas?

No. It generates XLSX from page text, without restoring original formulas or calculation dependencies.

Why do values shift after a blank cell?

A blank may have no text item. Position grouping cannot guarantee a business column. Reconstruct the meaning from the page instead of shifting blindly.

Can a scan become an accurate table directly?

This converter has no built-in image-table recognition. Use OCR or manual entry first, then review characters and field ownership.

Further reading & sources

Put the guide into practice

Open the relevant tool, preview the result and check your exported file.

Newer articles on this topic

Continue with a newer article that refers to this guide or explainer.

Related articles