FastBankConvertFastBankConvert home

Convert PDF to Excel on Linux: Calc, Scripts, Browser

By FastBankConvertPublished October 17, 2026

To convert a PDF to Excel on Linux, extract the text with pdftotext in layout mode, open the text file in LibreOffice Calc with fixed-width columns, set column types and save as .xlsx. For a short table, copy from the PDF viewer into Calc instead. For long or messy files, a browser converter works the same on Linux.

Which Linux tools can turn a PDF into a spreadsheet?

Linux has no single PDF-to-Excel button, but a few common tools cover the job together: a PDF viewer for copying, LibreOffice for spreadsheets, pdftotext for extracting text from the command line, and any web browser for online converters. Most desktop distributions ship the first two or install them in one command.

The pieces and what each one contributes:

Tool What it does here Typical package
Document viewer (Evince, Okular and similar) Displays the PDF and lets you copy text Usually preinstalled
LibreOffice Calc The spreadsheet; reads text and CSV, saves .xlsx libreoffice-calc
LibreOffice Draw Opens a PDF for editing, page by page libreoffice-draw
pdftotext Writes a PDF's text to a plain file, optionally keeping layout poppler-utils
Web browser Runs online converters Preinstalled

Package names differ by distribution, so search your package manager if one is missing. None of these tools needs Microsoft Office or a Windows machine.

The route you take depends on the file. For one page, copy and paste is quickest. For many pages in a regular layout, pdftotext and Calc give you a repeatable process. For scanned pages, none of the text tools work, which the last section covers.

Opening a PDF in LibreOffice on Linux

If you open a PDF from LibreOffice, it goes to Draw, the drawing program, not to Calc. Draw shows each page as an editable drawing, with each line of text in its own box. That is useful for fixing a typo in a PDF, but a poor way to get a table, because the boxes have no rows or columns.

You can still copy from Draw, or more simply from your document viewer. Select the table text, copy it, and paste into Calc. LibreOffice usually opens its Text Import dialog when you paste plain text into Calc. If it does not, use Edit, Paste Special, Paste Unformatted Text, which brings the dialog up.

In that dialog, choose Separated by and tick Space, or choose Fixed width and click in the preview ruler to set column breaks. Fixed width is the better choice when descriptions contain spaces, as most do.

The one-page limit

Copying from a viewer handles one page well. Over several pages, each copy brings back the page header and footer, and each paste needs the same column breaks set again. That is where the command line saves time.

pdftotext with layout mode, then Calc's Text Import

pdftotext, part of the poppler utilities, writes a PDF's text to a plain file. Its -layout option, per the pdftotext manual page, keeps "as best as possible the original physical layout of the text," so columns stay lined up with spaces. Calc can then split those aligned columns by position.

The commands

Here is a worked example on an invented file, invoice-list.pdf, where the table starts on page 2 and ends on page 3:

pdftotext -layout -f 2 -l 3 invoice-list.pdf invoice-list.txt
less invoice-list.txt

The manual page describes -f as the first page to convert and -l as the last. Without -layout, the manual notes, output follows reading order, which can pull columns apart. A few lines of the output might look like this:

2026-09-02   INV-10442   Harbour Supplies Ltd        1,240.00
2026-09-05   INV-10451   North Quay Fixings            315.75
2026-09-09   INV-10460   Harbour Supplies Ltd        2,005.10

Two other options from the manual help. -nopgbrk stops form-feed characters between pages, which otherwise show up as junk at the start of a line. -enc sets the output encoding, which defaults to UTF-8; leave it unless accented names come out garbled.

Bringing the text into Calc

  1. In LibreOffice, choose File, Open and pick invoice-list.txt. The Text Import dialog opens.
  2. Set the character set to Unicode (UTF-8).
  3. Choose Fixed width. Click in the ruler above the preview to place a break between each column.
  4. Click the header of the invoice number column and set its type to Text, so codes keep their exact form.
  5. Set the date column type to Date with the order that matches the file, here YMD.
  6. Choose OK. Then delete any page header lines that landed among the rows.
  7. Save with File, Save As, and choose Excel 2007-365 (.xlsx) as the file type.

If you do this every month, the column breaks will be the same, so the work becomes a minute or two. That repeatability is what a spreadsheet route needs; making a converted file you can sort and sum lists the checks to run on the result.

Amounts with thousands separators

Amounts such as "1,240.00" can arrive in Calc as text if your system's locale expects a different separator. In the Text Import dialog, set the language for the import to match the document, for example English (USA) for a comma thousands separator and a dot for decimals. Then look at the amount column after import: numbers sit at the right of the cell, text at the left. Sum the column and compare the total with the PDF before you save. A single amount stored as text drops out of the sum without any warning, so the comparison is the quickest way to catch it.

Making the monthly run repeatable

Once the commands work for one file, put them in a small shell script with the file name as its argument, and keep a note of the column breaks you used in Calc. Next month you run the script, open the text file, set the same breaks and save. If the layout changes, the preview in the Text Import dialog shows it at once, because the columns will no longer line up with your breaks.

A note on wide columns

Layout mode pads columns with spaces, and a long description can push the next column one character to the right on some rows. Scroll the Text Import preview to the end before you set breaks, and place each break in a gap that is clear on every row.

Browser converters on a Linux desktop

An online converter does not care what operating system you run. You open the page in Firefox or Chromium, upload the PDF, and download an .xlsx or .csv file, and the Linux desktop only handles the upload and the download. For long files or layouts the text tools mangle, this is often the easiest route.

The usual cautions apply. Read what the site says about encryption, storage and deletion before you upload a document with account numbers or client data in it. Prefer a site that tells you clearly.

For bank statements, FastBankConvert is getting ready to open as a browser converter that returns Excel, CSV or JSON, so it will run on Linux like anywhere else. Get started to be told when trial conversions open.

If the PDF holds more prose than figures, a spreadsheet may be the wrong target. Choosing between Excel and Word output helps you decide before you convert.

Does an .xlsx saved from LibreOffice Calc open cleanly in Excel?

For plain data, yes. A sheet of dates, text and numbers saved from Calc as .xlsx opens in Excel with the same values. Differences show up in the extras: some fonts, conditional formats, charts and complex formulas can look or behave slightly differently. Converted PDF data rarely uses those, so the risk is low.

Run three checks before you send the file to someone on Excel:

  • Dates. Open the file again in Calc and confirm dates are real dates, aligned right, not text. A date stored as text stays text in Excel.
  • Codes. Check that leading zeros are still there in the code column you set to Text.
  • Fonts. If the sheet uses a font Excel users do not have, it will be swapped for another. Stick to common fonts for shared files.

If your file will be added to a workbook someone already keeps in Excel, match their column order and headings before saving. Appending PDF data to an existing Excel sheet explains how to do that without breaking their formulas.

Linux PDF files that the text tools cannot read

pdftotext and LibreOffice read the text inside a PDF. A scanned page has no text, only an image, so both return nothing useful. Pages with tables drawn in unusual ways, such as text rotated sideways or columns built from many tiny text pieces, can also come out scrambled.

Quick test: run pdftotext -layout file.pdf - | head, where the dash sends the output to the screen. A blank result, or a few stray characters, means the page is an image.

For an image PDF on Linux, you need text recognition first. You can install an OCR tool from your distribution and run it on page images, or use a converter that handles scans. Expect to check every number afterwards.

Windows users with Microsoft 365 often do this job with Excel's PDF import, which can grow slow on long files. If you share the work with them, making a Power Query PDF import run faster is the page to send. On Linux, the text tools above do the same job by a different road.

All posts in PDF to Excel basics