I need to import multiple excel file data into an SQLite database, these excel files generated weekly basis having the same naming convention and data structure.
in my code 1st file data imported successfully, when I am trying to import the 2nd file it is giving me an error.
import sqlite3
import pandas as pd
filename="cps"
con=sqlite3.connect(filename+".db")
wb = pd.read_excel('CPS\cps29.xlsx',sheet_name = None)
for sheet in wb:
wb[sheet].to_sql(sheet,con,index=False)
con.commit()
con.close()
I need to append data into my database.
