Joubert Lucas
Joubert Lucas

Reputation: 163

Override default XlsxWriter behavior to not recalculate all cells upon opening

According to the documentation:

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.

This negates the benefit from using the value parameter when using write_formula().

Is there a way to override this behavior so that only cells I haven't given a value for gets recalculated?

Thank you!

Upvotes: 3

Views: 256

Answers (1)

jmcnamara
jmcnamara

Reputation: 41644

Is there a way to override this behavior so that only cells I haven't given a value for gets recalculated?

I don't think Excel has an option like that.

You can however, use the XlsxWriter set_calc_mode() method to turn on Excel's manual calculation option for the workbook.

Upvotes: 2

Related Questions