Hi Team ,
Please let me know how to insert excel file to the Word document as an OLE object.
Thanks in advance
Document doc = new Document();
//Add paragraph
Section sec = doc.addSection();
Paragraph paragraph = sec.addParagraph();
//Load images and add ole objects to link to Excel documents
DocPicture picture = new DocPicture(doc);
picture.loadImage("data/1.png");
DocOleObject ole = paragraph.appendOleObject("data/1.xlsx",picture, OleObjectType.Excel_Worksheet);
//Save
doc.saveToFile("output/AddOLE4.docx",FileFormat.Docx_2013);
doc.dispose();