Forum Discussion
How to convert PDF to Excel without losing formatting?
For PDFs where you can select the text, tabula-java is a free, open-source option that extracts tables locally. It’s a command-line tool, so it suits someone comfortable running a short command.
Install Java, download the runnable JAR from the tabula-java releases page, and run this, replacing the JAR filename with yours:
java -jar tabula.jar -p all -l -f CSV -o tables.csv report.pdf
This extracts tables from all pages into CSV. The -l option works best when cells have visible ruling lines. For tables separated mainly by whitespace, replace -l with -t.
In Excel, open Data > From Text/CSV and import the result. Check the delimiter and column types before loading, particularly decimal numbers and codes with leading zeros.
Tabula preserves table data rather than visual formatting: CSV won’t retain fonts, borders, or merged cells. It also doesn’t perform OCR, so it isn’t suitable for image-only scans without preprocessing.