from openpyxl import Workbook
from openpyxl.comments import Comment # 주석 관련 모듈
wb = Workbook()
ws = wb.active
comment = Comment("주석 테스트", "테스터") # 메모 생성, 내용과 작성자 두 데이터 입력
print(comment.text) # 메모 데이터 출력
print(comment.author) # 메모 작성자 출력
ws["B2"].comment = comment # B2 셀에 메모 추가
wb.save("sample_comment.xlsx")
댓글