Openpyxl modifies the existing file, and the border of the merged cell is missing when it is saved.

modify the existing Excel file. Here use the openpyxl module
. At present, the program opens a blank template Excel file and fills in the file, because the template contains such things as merging cells, but the program does not modify or manipulate merging cells. Finally, when saving the file, it is found that all the merged cells are missing a border

.

this is the normal state before the program runs
clipboard.png

clipboard.png

by programming for Google, I finally found the official website from this brother"s blog . Due to the limited proficiency in English, the author seems to have fixed this problem in version 2.6, which is portal

.

the version I am currently using is 2.5.9, which is also the latest version of the pip source.

now the problem arises. Does anyone know how to solve this problem in the current version?

Oct.29,2021

win32com

Menu