1import pandas as pd
2
3sheet1, sheet2 = None, None
4with pd.ExcelFile("PATH\FileName.xlsx") as reader:
5 sheet1 = pd.read_excel(reader, sheet_name='Sheet1')
6 sheet2 = pd.read_excel(reader, sheet_name='Sheet2')
1import sqlite3
2import pandas as pd
3from sqlalchemy import create_engine
4
5# Read Excel file or sheets using pandas
6
7# Setup code :)
8
9file = "location of Excel file..."
10
11engine = create_engine('sqlite://', echo=False)
12df = pd.read_excel(file, sheet_name=sheetname)
13df.to_sql("test", engine, if_exists="replace", index=False)
14results = engine.execute("Select * from test")
15final = pd.DataFrame(results, columns=df.columns)