I want get comment from an excel sheet protected with python using xlwings, but it returns None, even though it has a comment
import pandas as pd
import xlwings as xw
PATH = 'C:/Users/Hendo/Pictures/Sample.xlsx'
psw = '1234'
wb = xw.Book(PATH, password= psw)
sheet = wb.sheets['Sheet1']
print(sheet.range('H15').note)
print(sheet.range('H15').value)
It prints:
None
AAAA
I hope to return the cells comment(s)
Use the pywin32 interface and try changing your code to
Other method
This will Print all comments on all Sheets in the workbook.