After updating to v2.4.0 from v2.3.4 I have seen that just by opening a xlsx file and saving it:
from openpyxl import load_workbook wb = load_workbook('source.xlsx') wb.save('destination.xlsx')
fails to fully reproduce the previous borders of the merged cells. Specifically, not the borders of the "main" cell but those from the attached cells.
Changes spuriously the border of any merged cells (the second cell in a merged set) is lost.
Initially I thought it was a problem in the new copy_worksheet function I was trying to use, but it seems to have a more general impact.