I corrupted a workbook by setting a bad validation range

Issue #756 closed
Zvi Rackover created an issue

Not sure if this is a user error, a bug or a feature request.

I am using the latest released package.

The following code corrupted my workbook. The problem was that the column letters were in lower case.

decimal = DataValidation(type="decimal")
Save the workbook

Next time i loaded the workbook using openpyxl, an exception was raised after the regex which expects upper-case range letters failed.

So if this is not a user error, i suggest that openpyxl will either fail when entering a range which does not match the regex or use a more robust regex allowing lower-case column letters.


Comments (3)

  1. CharlieC

    Can you please check whether you see the problem with a checkout of the 2.4 branch? I recently rewrote some of the relevant code and don't see the problem locally.

  2. Log in to comment