openpyxl textbox support in 3.1.2

240 views
Skip to first unread message

Bhavin Bhatt

unread,
Oct 6, 2023, 9:35:51 AM10/6/23
to openpyxl-users
Hello all,
Am new to this community. I have a task to save an existing *.xlsx file with textbox already in it.

Issue: When I open an existing abc.xlsx (attached here) file, and save it with same or different name, the textbox that has a text = "Sample TEXT" is removed after save. 

===Code===
import openpyxl

work_book = openpyxl.load_workbook("abc.xlsx")
work_book.save("abc.xlsx")
===

I think this seems to be a known issue, so I thought of adding textbox manually, but I cannot find a single example so far that demos it. I have been trying all the properties provided in documentation (https://openpyxl.readthedocs.io/en/3.1.2/) but none of them work.

If anyone knows which version it is fully supported please let me know.

Any help would be appreciated.

Thank you in advance.
abc.xlsx
Reply all
Reply to author
Forward
0 new messages