Updated February 2019
Bari Baris Barisan Barisone Barito Barker Barks Barnabas Baro Baroe Baroh. Evil Evita Evolusi Evolution Ex Excel Exchange Exco Executive Exeter Exhibition. Ingrid Ini Inilah Inisiatif Injil Injili Injo Inka Inkuisisi Inland Inlandsche Inn Inner. Ishaq Ishida Ishikawa Isi Isinya Isis Iskak Iskandar Iskandariah Iskandariyah.
In this tutorial, I’ll be showing you how to use Python to convert specific pages of PDF tables into Excel, with the PDF to Excel API.
As an example we’ll be using the London Stock Exchange’s June 2017 Main Market Factsheet. We’ll extract and convert pages 5 (New and Further Issues by Method) and 7 (Money Raised by Business Sector) into a multi-sheet Excel workbook.
Here's what the end result will look like with the example PDF.
Before we start
In the previous tutorial (How to convert a PDF to Excel with Python), I showed you how to get the PDFTables Python library set up and running on your machine. If you haven’t already set up the library, I’d recommend reading that tutorial first.
Additionally, you'll need an API key and the
PyPDF2
library installed, which you can do via the command line/terminal with the following command:Step 1
![Isi Kandungan Injil Barnabas Pdf To Excel Isi Kandungan Injil Barnabas Pdf To Excel](http://a406.idata.over-blog.com/3/87/50/67/windows_anytime_upgrade.gif)
Create a new Python script then add the following code:
Step 2
Replace
my-api-key
on line #43 with your PDFTables API key, which you can get from our PDF to Excel API page. Save your finished script as convertpdfpages.py
in the same directory as the PDF document you want to convert.Step 3
Navigate to your
convertpdfpages.py
file in the command line/terminal and run the following: The script will then print the following:
This means that the conversion was successful. You’ll find your output XLSX in the same folder as the script and example PDF.
![Isi kandungan injil barnabas pdf to excel converter Isi kandungan injil barnabas pdf to excel converter](https://i.ytimg.com/vi/ZEVa82xW0z8/hqdefault.jpg)
If you open the XLSX now, you’ll see that pages 5 and 7 have been converted and added to their own sheets!
You're all done! You have successfully converted specific PDF pages to Excel using Python.
To convert to CSV, XML or HTML simply change
c.xlsx
to be c.csv
, c.xml
or c.html
respectively.Do you have more questions?
Check out our other blog posts hereor our FAQ page. Also, feel free to contact us.
Icons made by Smashicons from www.flaticon.com is licensed by CC 3.0 BY