0

I am working on a python project with excel. The excel file consist of 5 sheets with sheet1 connecting to other sheets by formula. The formula is too complex, I want to either use the exact excel formula in python so that I won't have to import all the large data or I write from python to excel sheet1 cell C12, C13 and C14 and print the excel formula-generated-value on sheet 1 cell C22, C23, C24 back to python.

When I tried import openpyxl wb = openpyxl.load_workbook("excel_file.xlsx") ws = wb.active ws["C12"].value = 1 ws["C13"].value = 60 ws["C14"].value = 25 wb.save("excel_file") print(ws["C23"].value) # This printed the formula embedded in the cell instead of the formula-generated-value.

or Is there a way I can use the exact excel formula on python and get the exact result?

0 Answers0