17 lines
329 B
Python
17 lines
329 B
Python
import sqlite3
|
|
import pandas as pd
|
|
import os
|
|
|
|
abspath = os.path.abspath(__file__)
|
|
dname = os.path.dirname(abspath)
|
|
os.chdir(dname)
|
|
|
|
con = sqlite3.connect('cps.db')
|
|
wb = pd.read_excel('GEFAHRGUTLISTE.xlsx',sheet_name = None)
|
|
|
|
for sheet in wb:
|
|
wb[sheet].to_sql(sheet,con,index=False)
|
|
|
|
con.commit()
|
|
con.close()
|
|
print('done') |