I already created a docx file by aspose.word and I need to embed an worksheet to this file thus I created a workbook and worksheet .
Document doc = new Document();
Workbook workbook = new Workbook();
int i = workbook.Worksheets.Add();
Worksheet sheet = workbook.Worksheets[i];
and after filling cells in the sheet I save my excel file in storage and embedded it to my docx by using insertOleObject
and pass file address to this method by using file stream.
workbook.Save(dir+"output.xlx");
Stream memStream = File.OpenRead(dir+"output.xlx");
Shape oleObject = builder.InsertOleObject(memStream, "Excel.Sheet.2",false,null);
but I want to embed a worksheet(or workbook) directly without using workbook.Save
method and Stream
object.