RoRoTo
On-device

Convert PDF tables to Excel, without the false promises

A PDF has no cells — only text at coordinates. Here is how a row-and-column guess works, when it is reliable, and how to check the spreadsheet before you do any statistics on it.

A PDF table looks like a spreadsheet, but underneath it is not one. A spreadsheet keeps values in named cells — B3 is B3, and the grid around it is real. A PDF keeps painted text: "this string was drawn at x = 210, y = 440 on page 2". There are no cells, no column widths and no row heights in the file, only coordinates.

That difference defines what a converter can honestly do. Turning a PDF table into Excel is not copying a table out of the file; it is rebuilding a grid from the positions of loose text. This guide is about that reconstruction: when the geometry gives a clear answer, when it does not, and how to verify the result before you trust a single number in it.

Why rows and columns have to be guessed

The extraction step reads the PDF's text layer with pdf.js, keeping each text fragment together with its x and y position on the page. To rebuild a table, the converter groups fragments whose y positions are close into a row, then walks along that row and starts a new column whenever the horizontal gap between fragments grows beyond a threshold.

Both decisions are inferences from geometry. There is no hidden table structure in the PDF to read — the tool is measuring the distances between painted words and making the same visual judgement your eyes make when you look at the page.

On a regular table this works well. When every row has a similar number of entries, columns line up vertically and the spacing between columns is consistent, the guess usually matches the table you can see. That is the case this kind of conversion is built for.

What restores well, and what does not

  • Simple grid tables — price lists, invoices, schedules and report tables with one row per record usually come back as a clean, usable grid.
  • Consistent spacing — tables with a clear gap between columns give the column split a strong signal; narrow or uneven gaps make it harder.
  • Plain text and numbers — values are exported as cell content; the tool does not recreate fonts, borders or background colours.

The honest limits matter just as much:

  • Merged cells are not supported. A header spanning four columns is just one piece of text sitting above four separate columns. The converter cannot know it was merged, so it lands in a single cell and you fill the rest in yourself.
  • Multi-line cells can become several rows. A long label that wraps onto two visual lines has two y positions, so it may be read as two records.
  • Complex layouts are unreliable. Nested tables, rotated text, two tables side by side and decorative report layouts need manual cleanup — sometimes a full rebuild.
  • Scans have no text at all. No text layer means no coordinates to cluster, so there is nothing to convert.

Scanned tables need OCR first

A scanned PDF is a photograph of a page. It may look exactly like a table, but it contains no text layer and no positions to measure. Send it straight to a table converter and you get an empty file, not a spreadsheet.

The fix is to recognise the text first. Run OCR over the scan to produce a PDF with a real text layer, then feed that result into PDF to Excel. Keep in mind that OCR sets the ceiling for accuracy: if recognition reads a 8 as a 3, the spreadsheet faithfully carries that mistake. Spot-check the digits against the original image after conversion.

XLSX or CSV: choose the right output

The same reconstructed grid can be written two ways, and the right choice depends on what happens next.

  • .xlsx keeps a real multi-column structure with each value in its own cell. Choose it when you will keep working in Excel or WPS: sorting, formulas, formatting and charts all expect a workbook. The file is written as a minimal OOXML workbook with inline strings, so Excel and WPS open it directly.
  • .csv is plain text: one record per line, columns separated by commas. Choose it when the data is going somewhere else — a database import, a script, a statistics package. It is saved as UTF-8 with a BOM, so Excel on Windows displays Chinese, Spanish and other accented characters correctly instead of mojibake.

One trade-off to remember: CSV stores no cell types and no styling. A code like 0012 may be displayed as 12 when a spreadsheet reopens the file. If leading zeros, dates or exact number formats matter, take the .xlsx output and set those cells to text in Excel before entering anything else.

Convert locally, in your browser

Conversion runs in your browser; the file is never uploaded. pdf.js reads the text layer and pdf-lib writes the workbook, all inside the tab — no account, no upload queue, no copy sitting on someone else's server.

  1. Open PDF to Excel and drop the PDF into the page. Extraction starts in the tab.
  2. Adjust the column gap if the preview merges two columns or splits one column in half. A larger gap separates columns more aggressively; a smaller gap keeps tightly spaced columns together. This is the main knob for an imperfect layout.
  3. Pick the output format: .xlsx for further work in a spreadsheet, .csv for feeding another program.
  4. Download the file and open it in Excel or WPS.

For a scan, run OCR first and convert the text-bearing PDF it produces. If all you need from the PDF is running text rather than a grid, Extract text is the simpler destination.

Proofread in Excel before you compute

A reconstructed table is a starting point, not a finished dataset. A few quick checks catch most coordinate-guessing mistakes:

  • Check that columns line up. Scan the first and last few rows: if one record has an extra populated column, a cell was probably split or a wrapped line became its own row.
  • Verify a handful of cells against the PDF by clicking them and reading the formula bar. Pay special attention to the first and last record on each page.
  • Sum a numeric column and compare with any total printed in the PDF. A mismatch usually means a number was misread, dropped or turned into text.
  • Fill in merged headers yourself. A header that covered several columns will appear in one cell; copy it across the columns it actually describes so filters and pivot tables make sense.
  • Watch for lost leading zeros and shifted dates, especially if you opened a CSV. Reopen the .xlsx version and format the column as text if the codes matter.

Treated as a reconstruction of well-behaved tables — not a magic copy of arbitrary layouts — coordinate-based PDF to Excel conversion is a practical way to get numbers out of a report and into a spreadsheet, and doing it locally keeps the document yours.

Frequently asked

Why are my columns shifted or stuck together?

Columns are inferred from the horizontal gaps between text, not from real cell boundaries. Open the tool and adjust the column gap: increase it to separate columns that merged, decrease it to rejoin a column that was split. Tables with uneven spacing or merged headers may still need a manual fix.

Why did I get an empty spreadsheet?

Almost certainly a scan: an image-only PDF has no text layer, so there are no coordinates to cluster. Run OCR first, then convert the text-bearing PDF it produces.

Does it support merged cells or multi-line cells?

No. A merged header is exported as one text fragment and lands in a single cell, and a wrapped label may be read as two rows. Fill or join those cells manually in Excel after conversion.

Should I export xlsx or CSV?

Use .xlsx if you will sort, format or run formulas in Excel or WPS: it keeps a real multi-column cell structure. Use .csv to import into a database, script or statistics program; it is written as UTF-8 with a BOM so accented characters display correctly in Excel on Windows.

How do I keep leading zeros like 0012?

Prefer the .xlsx output and format that column as Text in Excel, or type an apostrophe before the value. CSV has no cell types, so a spreadsheet may reinterpret 0012 as 12 when the file is reopened.

Is my file uploaded to a server?

No. Text extraction and workbook generation both run inside your browser, so the PDF never leaves your device.

Tools mentioned

Published 2026-11-24 · All guides