Search code examples
python-3.xopenpyxlxlwt

Is there a way in pyxl to keep existing macros?


I have some excel files that I want to modify, the modification is just regarding cells. In these excel files are vba macros that I have to preserve after the modification. I was playing with xlwt library, after to make the modifications and save the files I lost the macros. I just wondering if I can do with pyxl. I would like to know if with one of these libraries could preserve this info or I should ise another one.

Thanks in advance.


Solution

  • I found a way using the library pywin32 to use excel trough windows as a com object.