Insert Memory Stream Image into Cell Aspose.Cells

I have searched the formums and not able to find any articles on how to insert an image from a memory stream into an Excel cell using Asopose.Cells.

Can you provide and example with code?

Hi,

Please see the following sample code to add a picture/image into an Excel worksheet using a stream.U

//Instantiating a Workbook object
Workbook workbook = new Workbook();

//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[0];

FileStream stream = new FileStream("C:\\17820_logo.jpg", FileMode.Open, FileAccess.Read);
int indexPicture = worksheet.Pictures.Add(5, 5, stream);

Picture picture = worksheet.Pictures[indexPicture];
picture.Placement = PlacementType.Move;

//Saving the Excel file
workbook.Save("C:\\book1.xls");

Thank You & Best Regards