0

To my understanding, xlsxwriter can only create new workbooks, not modify existing ones--or can it? I would like to simply add some custom properties to an already-existing workbook by using the workbook.set_custom_property() method.

https://xlsxwriter.readthedocs.io/workbook.html#workbook-set-custom-property

likethevegetable
  • 264
  • 1
  • 4
  • 17
  • I found this link in the documentation https://xlsxwriter.readthedocs.io/alternatives.html You can find another tools that provide update functionalities, for example "OpenPyXL" – David Rodrigues Jul 08 '22 at 15:51
  • This function doesn't seem to be implemented yet in openpyxl @DavidRodrigues – likethevegetable Jul 08 '22 at 15:56
  • May be doable with xlwings, or with win32com. – BigBen Jul 08 '22 at 15:57
  • @BigBen I can do this with win32com, but it's a lot more error-prone that xlsxwriter and openpyxl. I've asked other questions how how to do this with openpyxl. – likethevegetable Jul 08 '22 at 15:58
  • How is win32com more error prone? – BigBen Jul 08 '22 at 16:00
  • From what I've tried, it opens Excel in the foreground. When I save the Workbook, it prompts for a save name which defeats my automation needs. If I try to pass some args like FileName, I get some path not found errors. If the process is interrupted, I have to kill the Excel process if I want to restart. It's also significantly slower. – likethevegetable Jul 08 '22 at 16:02
  • Those all sound fixable, and not due to win32com itself but rather how you're using it. – BigBen Jul 08 '22 at 16:09

0 Answers0