Hi,
I am able to extract the embedded excel file from the document using Aspose.Words as follows. But I am not able to figure out to embed the changed file back into the document. Can anyone help?
Document doc = new Document("C:\sample.docx");
NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
foreach (Shape shape in shapes)
{
// Ignore if not OLE
if (shape.ShapeType != Drawing.ShapeType.OleObject)
continue;
MemoryStream ms = new MemoryStream();
shape.OleFormat.Save(ms);
// process embedde file
// save it back to word file
}
Regards,
Bhavesh