Delete rows but translate remaining rows

60 views
Skip to first unread message

Brian Murrell (Brian J. Murrell)

unread,
Nov 1, 2024, 1:15:47 PM11/1/24
to openpyxl-users
I want to delete a series of rows:

ws.delete(10, 10)

But then I want any formulas in the remaining rows' cells to be translated to account for the fact they have been moved up 10 rows.

Any thoughts on the best way to go about this?

Michel MARTIN

unread,
Nov 27, 2024, 2:22:36 PM11/27/24
to openpyxl-users

Brian Murrell (Brian J. Murrell)

unread,
Nov 27, 2024, 2:48:48 PM11/27/24
to openpyxl-users
Are you referring to the block of text that reads:

Note Openpyxl does not manage dependencies, such as formulae, tables, charts, etc., when rows or columns are inserted or deleted. This is considered to be out of scope for a library that focuses on managing the file format. As a result, client code must implement the functionality required in any particular use case.

?

If so, it's a good thing I went ahead and did implement my own functionality for that.  :-)
Reply all
Reply to author
Forward
0 new messages