i use google collab
install the packege needed
!pip install tabula-py
!pip install pandas
Import the required Module
import tabula
import pandas as pd
Read a PDF File
data = tabula.read_pdf("example.pdf", pages='1')[0] # "all" untuk semua data, pages diisi nomor halaman
convert PDF into CSV
tabula.convert_into("example.pdf", "example.csv", output_format="csv", pages='1') #"all" untuk semua data, pages diisi no halaman
print(data)
to convert to excell file
data1 = pd.read_csv("example.csv")
data1.dtypes
now save to xlsx
data.to_excel('example.xlsx')