import openpyxl
import threading
wb = openpyxl.load_workbook('produceSales.xlsx')
sheet = wb.active
all_info = []
for row in sheet.rows:
child = [cell.value for cell in row]
all_info.append(child)
def Celery():
for i in all_info:
if i[0] == 'Celery':
i[1] = 1.19
def Garlic():
for i in all_info:
if i[0] == 'Garlic':
i[1] = 3.07
def Lemon():
for i in all_info:
if i[0] == 'Lemon':
i[1] = 1.27
if __name__=='__main__':
t1 = threading.Thread(target=Celery)
t2 = threading.Thread(target=Garlic)
t3 = threading.Thread(target=Lemon)
t1.start()
t2.start()
t3.start()
t1.join()
t2.join()
t3.join()
wb = openpyxl.Workbook()
sheet = wb.active
for row,item in enumerate(all_info):
for column,cellvalue in enumerate(item):