Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from openpyxl import load_workbook
- wb = load_workbook(filename='Data.xlsx')
- ws = wb['Data']
- ws.auto_filter.ref = "A1:E1"
- ws["E1"] = 'Fillrate%'
- ws["E2"] = round(((ws['C2'].value)/(float(ws['B2'].value))*100),2)
- ws["E3"] = round(((ws['C3'].value)/(float(ws['B3'].value))*100),2)
- ws["E4"] = round(((ws['C4'].value)/(float(ws['B4'].value))*100),2)
- ws["E5"] = round(((ws['C5'].value)/(float(ws['B5'].value))*100),2)
- ws["E6"] = round(((ws['C6'].value)/(float(ws['B6'].value))*100),2)
- wb.save("Analized_Data.xlsx")
- ws["E2"] = round(((ws['C2'].value)/(float(ws['B2'].value))*100),2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement