Skip to content
Forge Files All toolsGuidesAbout

Extract Tables from a PDF to Excel Without Losing Formatting

Copying a table straight out of a PDF often merges columns and breaks numbers. Here is how to keep your data organized and properly formatted.

Published by Forge Files · Updated

01

The problem with PDF tables

A PDF is designed to look exactly the same on every device, whether it is a phone screen or a printed page. To achieve this, a PDF does not store structured data like an Excel spreadsheet does. Instead, it stores a list of instructions: draw a line here, place the letter 'A' at these exact coordinates, and fill this rectangle with gray.

When you see a table in a PDF, your brain recognizes the grid. But the computer only sees isolated lines and text floating in space. Because the document has no concept of 'rows' or 'columns', highlighting and copying the text usually results in a jumbled mess when you paste it into a spreadsheet. Numbers merge together, headers misalign, and empty cells are completely ignored.

Fixing this manually is not just frustrating—it is risky. Rebuilding a financial statement or inventory list by copying and pasting invites typographical errors that can invalidate the entire dataset. You need a method that actually understands the visual grid and reconstructs it into rows and columns.

02

Method 1: Excel's built-in Data from Picture

If you only have a small table—perhaps a dozen rows—you can use a relatively new feature built directly into modern versions of Microsoft Excel. Rather than pasting text, you take a screenshot of the PDF table and ask Excel to analyze the image.

  1. Take a clear screenshot of the table in the PDF.
  2. In Excel, go to the Data tab.
  3. Click From Picture and select your screenshot.
  4. Wait for Excel to analyze the image.

Excel will attempt to recognize the text and the grid, presenting a preview where you can review any low-confidence cells. This method is fast, but it has a significant drawback: it relies entirely on optical character recognition (OCR), even if the original PDF contained perfectly selectable digital text. OCR is inherently probabilistic. It might mistake a '1' for an 'l', an '8' for a 'B', or a '0' for an 'O'. You must carefully proofread every single cell to ensure your data is accurate.

03

Method 2: Excel Power Query

For larger documents or recurring tasks, Excel's Power Query provides a more robust solution, though it comes with a steeper learning curve. Power Query can connect directly to a PDF file and extract tabular data.

  1. In Excel, navigate to the Data tab.
  2. Select Get Data > From File > From PDF.
  3. Locate and select your PDF file.

The Navigator window will open, displaying a list of tables and pages Excel found in the document. You can select the tables you need and click Load to import them, or Transform Data to clean up the formatting before loading. Power Query is excellent for clean, digitally created PDFs with clear borders. However, it can struggle with borderless tables (where columns are aligned only by whitespace) or complex layouts with merged cells. It also requires the desktop version of Excel for Windows.

04

Method 3: Dedicated automated extraction

When you need to extract tables quickly without installing software or configuring queries, a dedicated conversion tool is often the best approach. An automated extractor analyzes both the drawn lines (ruled tables) and the alignment of the text (borderless tables) to reconstruct the grid.

  1. Open PDF to Excel and choose your document.
  2. Wait for the analysis to finish.
  3. Download the spreadsheet and open it. Check that the columns match your original document.

Forge Files processes supported documents entirely on your device, meaning the file never leaves your browser. This is particularly important for financial statements or confidential reports. Furthermore, the on-device extraction is smart enough to preserve data types. A price formatted as $1,250.00 or a percentage like 12.5% is recognized and stored as a proper numeric value in Excel, not just plain text. This allows you to immediately sum columns or apply formulas without having to clean the data first.

05

Dealing with scanned documents

All the methods discussed above assume your PDF contains digital text. If your PDF is a scanned document—essentially a photograph of a piece of paper—the extraction process becomes more complicated. A scanned PDF does not contain text; it only contains pixels. Automated extractors cannot read the numbers or see the grid lines.

If you have a scanned PDF, you must first run it through OCR PDF (Optical Character Recognition) to add an invisible layer of searchable text over the image. Once the text is readable, you can attempt to extract the tables. Alternatively, you may need to rely on specialized OCR software designed specifically for tabular data extraction from images. Always thoroughly verify the output of any OCR process, as image quality, skew, and blur can significantly impact accuracy.

06

Best practices for verifying your data

No automated tool is flawless. The complex and unstructured nature of PDF files means you should always verify extracted data before using it in a professional setting.

  • Check the totals: If your table includes a 'Total' row, use an Excel formula to sum the extracted column and verify it matches the extracted total. This is the fastest way to catch missing or misinterpreted numbers.
  • Inspect merged cells: Merged headers or data cells are notoriously difficult to extract. Check that the data hasn't been duplicated across columns or shifted to the wrong row.
  • Look for split tables: If a table spans multiple pages in the PDF, it will often be extracted as multiple separate tables or sheets in Excel. You will need to manually append the data.
  • Verify number formats: Ensure that decimal points and thousands separators have been interpreted correctly, especially if the PDF uses European formatting (e.g., 1.250,00).

By understanding the limitations of the PDF format and choosing the right extraction method for your document, you can save hours of manual data entry while maintaining the integrity of your spreadsheets.

Frequently asked questions

Why did all my data paste into one column?

PDFs do not store grid structures. They only store the visual position of text. When you paste into Excel, it treats the visual lines of text as single paragraphs, resulting in a single column.

Can I extract a table that doesn't have borders?

Yes, advanced tools can extract 'borderless' tables by analyzing the whitespace and alignment of the text to infer the column structure.

Can I extract just one table from a large report?

Yes. If you only want one page, use Extract Pages first, then convert only that page to Excel. This saves time and avoids extracting irrelevant data.

Related free tools