Adding or deleting rows or columns does not update cell ranges
Created originally on Bitbucket by WheeleD (David Wheeler)
When using any of the following worksheet methods, the coordinates for cell ranges that are impacted by the change do not get updated:
- insert_columns()
- insert_rows()
- delete_columns()
- delete_rows()
- _move_cells()
So far I can confirm the following are not updated:
- named ranges in wb.defined_names
- merged cell ranges in ws.merged_ cells
- Print_Area (ws._print_area)
I would suspect the following to also be affected, although less likely to cause an issue:
- ws._print_rows
- ws._print_cols
In addition, ColumnDimensions and RowDimensions are not following the columns and rows as the cells are moved.
There may be other things that would be affected that I have not identified yet. I have a prototype of a fix for the merged cell ranges but given the wider scope than that, more than one kind of fix will presumably be needed and it may be desirable to have an architectural fix that would work for any cell range including ones that have not been implemented yet.