简体   繁体   中英

How to Ignore "Inconsistent Formula" warning showing in generated .xlsx file using the python xlsxwriter?

In my file there are MAX and MIN formulas in a row. Sample

CELLS - | A | B | C | D | E | F | G | H |

ROW: | MAX | MIN | MIN | MAX | MIN | MIN | MAX | MIN |MIN

If the excel sheet is opened a green triangle is displaying with a warning message "Inconsistent Formula".

This is a standard Excel warning to alert users to the fact that repeated and adjacent formulas are different since that may be an error.

It isn't possible to turn off this warning in XlsxWriter.

Stumbled across this answer while looking for a way to do it in Python using the openpyxl package. However, up until now, I've always handled this with VBA. Here's an example:

Range("G18").Errors(4).Ignore = True

*where an index of 4 corresponds to an inconsistent formula

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM