logo
search
Data Import & Export

How to Copy a PDF or Web Table into Excel Without Losing Formatting

Aamir Naveed AkramAamir Naveed Akram Oct 10, 2026 869 views

Question details

The user wants to copy data tables from PDF files or websites into Excel while retaining the original spacing and formatting.

How to Copy a PDF or Web Table into Excel
Product
Excel
Device & OS
not provided
Scenario
Importing or copying table data from an external source (PDF or Web) into a spreadsheet.
Observed behavior
Pasting the table directly into Excel or Notepad causes the data to lose its original layout, spacing, and formatting, particularly when the table contains empty cells.
Before you start

Ensure you have the source PDF document saved locally on your computer, or copy the URL if extracting from a web page, and verify that the table data is clearly structured.

Solution 1Recommended

Import PDF or CSV Data Using Excel's Get Data Feature

Using Excel's built-in Get Data feature ensures that data structures, including empty cells and columns, are preserved correctly during the import process.

Directly pasting tables often ignores column breaks. By using the Power Query (Get Data) tool, Excel processes the background structure of the source file to maintain the correct layout.

1
Save or Extract the Data

If dealing with a web table, save the extracted data as a text or CSV file first. If dealing with a PDF, ensure it is saved securely on your device.

2
Access the Get Data Menu

Open Excel, navigate to the 'Data' tab on the top ribbon menu, and click on 'Get Data' (or 'New Query' in older versions).

3
Select Your Data Source

Choose 'From File' and then select 'From Text/CSV' or 'From PDF' (if available in your Office version). Browse your computer to locate and select the file.

4
Transform and Load Data

A preview window will appear. If the layout looks correct, click 'Load'. If you need to fix empty cells or shift columns, click 'Transform Data' to adjust the layout in Power Query before loading it into your spreadsheet.

Import PDF or CSV Data Using Excel's Get Data Feature
Power Query Capabilities: The Power Query Editor allows you to easily filter out unwanted rows or merge columns before the data even touches your final spreadsheet.
WPS Office PDF Tools

Effortlessly Convert PDF Tables to Excel with WPS Office

WPS Office features a built-in PDF toolkit that allows you to seamlessly convert PDF files directly into editable Excel spreadsheets. It accurately recognizes table structures, preserving the original formatting and cell layouts without requiring complex data import queries.

  1. 1. Open the PDF File: Launch WPS Office and open the PDF document that contains the table you wish to extract.
  2. 2. Select PDF to Excel: Navigate to the 'Tools' tab on the top ribbon and click on the 'PDF to Excel' option.
  3. 3. Configure the Conversion: In the pop-up window, select the specific pages containing the tables you need, and choose your desired output location.
  4. 4. Convert and Edit: Click 'Convert'. The file will automatically open as a perfectly formatted spreadsheet in WPS Spreadsheet, ready for editing.
Built-in PDF-to-Excel converter accurately extracts complex table structures.Fully compatible with Microsoft Excel (.xlsx) and CSV formats.Lightweight, free to download, and includes a full suite of Writer, Spreadsheet, and Presentation tools.
QA img-9

Frequently Asked Questions

Why does my PDF table paste into a single column in Excel?

When you paste directly, Excel often reads PDF text as a continuous string without column delimiters. Using the 'Get Data' feature or a dedicated PDF-to-Excel converter forces the program to recognize proper table structures.

Can I extract only a specific table from a multi-page PDF?

Yes. When using the 'Get Data' feature in Excel, the Navigator window lets you select the specific table or page you want to import. Similarly, most PDF converters allow you to specify an exact page range.

How do I import a table directly from a website into Excel?

Go to the 'Data' tab, select 'Get Data', choose 'From Other Sources', and click 'From Web'. Paste the URL of the webpage, and Excel will scan the site to detect and extract HTML tables.

What if the PDF contains scanned images instead of text?

If the PDF is an image or scanned document, standard copy-pasting or basic importing will not work. You will need to use a PDF tool equipped with OCR (Optical Character Recognition) to identify and extract the visual text into an editable Excel table.