I have a excel file with a worksheet. I want to insert a new row in 6th row. If I directly open Excel app and press the right-click the mouse on 6th row and press “insert”, it will insert a new row while doesn’t mismatch the format and content below the 6th row.
worksheet.insert_rows(idx=6, amount=1)
However, if I use the above code to insert a new row, the content below the 6th row will be pan to the next row, but the format remains unchanged.
For example, I have a merged cell in 9th row. I hope that its format and content will be synchronously pan to the 10th row after insertion. But after I run the code, the content was pan to 10th row, but the merged cell format still remains at 9th row.
How can I modify my code to meet my need? Thanks very much!!! qwq