Openpyxl 1.8.5: Reading the result of a formula typed in a cell using openpyxl

后端 未结 4 706
刺人心
刺人心 2020-11-30 11:21

I am printing some formula in one of the Excel sheets:

wsOld.cell(row = 1, column = 1).value = \"=B3=B4\"

But I cannot use its result in im

4条回答
  •  囚心锁ツ
    2020-11-30 11:55

    openpyxl support either the formula or the value of the formula. You can select which using the data_only flag when opening a workbook. However, openpyxl does not and will not calculate the result of a formula. There are libraries out there like pycel which purport to do this.

提交回复
热议问题