Open craigbrown opened 3 years ago
Ole objects are currently not supported by EPPlus, so there are not logic to copy them either. However, it might be a good idea to make sure the copy worksheet copies the bin file and the relations to preserve the objects.
This is an obscure one. I have a worksheet with an OLE Object on it - an Equation object from a very old version of Excel which wasn't visible on the sheet (and I didn't actually realise it was there). When I copy this sheet (either in the same workbook or a new workbook) and then open it in Excel, I get a message from Excel saying that the file is corrupt.
From closer inspection of the XML, it looks like the OLE data is being copied inside the
sheet1.xml
file, but some of the necessary files aren't:If I manually copy the missing files and add the missing lines to
sheet1.xml.rels
and[Content_Types].xml
then I can open the file in Excel without it complaining about it being corrupt.I've attached a basic file containing an OLE object to demonstrate the bug, and here's some code which will produce a faulty file:
Probably a very low impact bug, but still thought it was worth letting you know that this problem exists.
OLEObjectTest.xlsx