title: How to store all the tables from pdf file to excel sheet using python?
body: <p>1.I am able to get all the tables of PDF file.. but when I want to store all table, only the last table get saved in my excel sheet.</p>
  
  <p>2.How to deal with these Overwritten values.</p>
  
  <p>3.for loop last table will be saved in excel</p>
  
  <pre><code>import PyPDF2
  import tabula
  from tabula import read_pdf
  import pandas as pd 
  from xlwt import Workbook 
  
  
  
  pdfFileObj = open('LAB.pdf', 'rb')
  pdfReader = PyPDF2.PdfFileReader(pdfFileObj)
  print(pdfReader.numPages)          #Total number of pages 
  pageObj = pdfReader.getPage(5)
  
  
  
  #LAB is my pdf file
  x = tabula.read_pdf("LAB.pdf", pages='all', multiple_tables=True)
  for i in x:    #x values in list []
      print("printing all the table from the sheet", i)
      df = pd.DataFrame(i)
  df.to_excel('tables.xlsx', header=True, index = True)
  </code></pre>