XMLSyntaxError when saving files w/ keep_vba = True

Issue #848 closed
Thomas O'Boyle created an issue

I haven't been able to find if this is simply a bug with version 2.3.x but I am unable to open and successfully save files where keep_vba=True. For example:

wb = openpyxl.load_workbook('doc.xlsm', keep_vba=True) .. wb.save('doc2.xlsm')

fails with:

lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: br line 95 and b, line 96, column 12

even if no changes are made to the file.

Comments (7)

  1. CharlieC

    2.3 isn't supported any more. Can you try version 2.4 and, if the problems still persists, provide a sample file?

  2. Victor Stanescu

    Has this bug been solved? I have the same issue : file = 'Site_List.xlsm' wb = openpyxl.load_workbook(file, keep_vba = True) the error: lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: br line 57 and font, line 58, column 14

  3. Log in to comment