覆盖默认的 XlsxWriter 行为以在打开时不重新计算所有单元格
Override default XlsxWriter behavior to not recalculate all cells upon opening
根据文档:
XlsxWriter doesn’t calculate the result of a formula and instead stores the value 0 as the formula result. It then sets a global flag in the XLSX file to say that all formulas and functions should be recalculated when the file is opened.
这抵消了在使用 write_formula() 时使用值参数的好处。
有没有办法覆盖此行为,以便只有我 没有 给定值的单元格才会重新计算?
谢谢!
Is there a way to override this behavior so that only cells I haven't given a value for gets recalculated?
我认为 Excel 没有 option like that。
但是,您可以使用 XlsxWriter set_calc_mode()
method 为工作簿打开 Excel 的手动计算选项。
根据文档:
XlsxWriter doesn’t calculate the result of a formula and instead stores the value 0 as the formula result. It then sets a global flag in the XLSX file to say that all formulas and functions should be recalculated when the file is opened.
这抵消了在使用 write_formula() 时使用值参数的好处。
有没有办法覆盖此行为,以便只有我 没有 给定值的单元格才会重新计算?
谢谢!
Is there a way to override this behavior so that only cells I haven't given a value for gets recalculated?
我认为 Excel 没有 option like that。
但是,您可以使用 XlsxWriter set_calc_mode()
method 为工作簿打开 Excel 的手动计算选项。