Hi ApsSanj-3718,
You can try to use Range.PasteExcelTable method to embed an excel-file in a word document.
Here is my test code you can refer to.
using Excel = Microsoft.Office.Interop.Excel;
using Microsoft.Office.Interop.Word;
using Application = Microsoft.Office.Interop.Word.Application;
var path = @"C:\Users\Desktop\tt.xlsx";
Excel._Application excel = new Excel.Application();
var template = excel.Workbooks.Add(path);
var worksheet = (Excel.Worksheet)template.Worksheets["Sheet1"];
var table = (Excel.Range)worksheet.Range["A1:A5"];
table.Copy();
Application ap = new Application();
Document document = ap.Documents.Open(@"C:\Users\Desktop\tt.docx");
document.Bookmarks["test"].Range.PasteExcelTable(false, true, false);
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.