openpyxl merged cells: Formatting issue
Say I have an xlsx-file and this Excel file has cells A2 and B2 merged. I also select that merged cell and put a border at the top and bottom of the merged cell. When I do the following: wb = openpyxl.load_workbook("file.xlsx") wb.save("resulting file.xlsx") The result is that only the portion around the merged cell that is in column A now has the border: Is there a way to prevent this from happening? I believe you are facing Issue#365 , there is generally an issue around styling for merged cells, I believe the above mentioned issues tracks it. Sadly, I do not see any workaround for this issue