How To Protect My Excel File

72 views
Skip to first unread message

Yunusemre ŞAHİN

unread,
Feb 29, 2024, 3:30:25 AMFeb 29
to openpyxl-users
I have an excel sheet and i want to update only 2 cell inside this sheet. I can update these cells but somewhere of the sheet's formatting is disrupted. I add an example picture for this situation.
afterUpdated.PNG
original.PNG

Yunusemre ŞAHİN

unread,
Feb 29, 2024, 3:37:41 AMFeb 29
to openpyxl-users
My code is:

wb = load_workbook(filename=file_path)
ws = wb[sheet_name]
ws[cell] = new_value
wb.save(file_path)

29 Şubat 2024 Perşembe tarihinde saat 11:30:25 UTC+3 itibarıyla Yunusemre ŞAHİN şunları yazdı:
Reply all
Reply to author
Forward
0 new messages