We have word documents with embedded excel charts. In some cases, when the document is opened and save using the library, it results in a corrupted document. The document cannot be opened at all. In attachment you’ll find a repro with a test document.
Thanks
EDIT: after some debug I foun out the issue. It seems the namespace is wrong. instead of:
<c:extLst xmlns:c16r2="http://schemas.microsoft.com/office/drawing/2015/06/chart">
<c:ext uri="{C3380CC4-5D6E-409C-BE32-E72D297353CC}" xmlns:c16="http://schemas.microsoft.com/office/drawing/2014/chart">
<c16:uniqueId val="{00000001-F0C2-4992-82CF-BD155CD4B946}" />
</c:ext>
<c:ext uri="{CE6537A1-D6FC-4f65-9D91-7224C49458BB}" xmlns:c15="http://schemas.microsoft.com/office/drawing/2012/chart">
<c:layout>
<c:manualLayout>
<c:w val="0.0624048360999929" />
<c:h val="0.051488772908575883" />
</c:manualLayout>
</c:layout>
</c:ext>
</c:extLst>
It should be:
<c:extLst xmlns:c16r2="http://schemas.microsoft.com/office/drawing/2015/06/chart">
<c:ext uri="{C3380CC4-5D6E-409C-BE32-E72D297353CC}" xmlns:c16="http://schemas.microsoft.com/office/drawing/2014/chart">
<c16:uniqueId val="{00000001-F0C2-4992-82CF-BD155CD4B946}" />
</c:ext>
<c:ext uri="{CE6537A1-D6FC-4f65-9D91-7224C49458BB}" xmlns:c15="http://schemas.microsoft.com/office/drawing/2012/chart">
<c15:layout>
<c:manualLayout>
<c:w val="0.0624048360999929" />
<c:h val="0.051488772908575883" />
</c:manualLayout>
</c15:layout>
</c:ext>
</c:extLst>