openpyxl 插入批注
# 插入批注 from openpyxl import Workbook from openpyxl.comments import Comment wbook=Workbook() wsheet=wbook.active wsheet["A1"].value = '人生苦短,我用Python' comment = Comment("这是一个comment", "Python知识学堂") comment.width = 300 comment.height = 50 wsheet["A1"].comment = comment wbook.save('commented_test.xlsx')