So I have made this code, it goes smoothly through all the files but doesn't write them into the database. Someone maybe know the fix for this?
import pandas as pd
import os
import openpyxl
files= [file for file in os.listdir(r'path')]
a = pd.DataFrame()
for file in files:
wb= openpyxl.load_workbook(r'path'+file)
print (wb)
for ws in wb.sheetnames:
ws = wb[ws]
data = ws.values
columns= next(data)[0:]
df = pd.DataFrame(data, columns=columns)
d= pd.concat([df,a])
print (a)