Hello Dear,
Please use the code snippet given below to add the particular cells from excel file as image in Aspose.Slides .NET. Please share with us, if you may feel any issue.
Workbook book = new Workbook("D:\\Aspose Data\\Book1.xls");
Presentation pres = new Presentation();
Slide slide;
Aspose.Cells.Rendering.ImageOrPrintOptions imgOptions = new Aspose.Cells.Rendering.ImageOrPrintOptions();
imgOptions.ImageFormat = ImageFormat.Emf;
imgOptions.HorizontalResolution = 200;
imgOptions.VerticalResolution = 200;
Worksheet sheet = book.Worksheets[0];
int iImageIndex;
ImageEx Imag;
//Set the print area accroding to your desired range of cells for which
//you want the image to be taken.
sheet.PageSetup.PrintArea = "A1:C30";
MemoryStream ImageMs;
Picture pic;
Aspose.Slides.Shape ImgShape;
Aspose.Cells.Rendering.SheetRender sr = new Aspose.Cells.Rendering.SheetRender(sheet, imgOptions);
for (int j = 0; j < sr.PageCount; j++)
{
ImageMs = new MemoryStream();
sr.ToImage(j, "D:\\Aspose Data\\cellrange_" + sheet.Index + j + ".emf");
sr.ToImage(j, ImageMs);
slide = pres.AddEmptySlide();
pic=new Picture(pres,ImageMs);
iImageIndex=pres.Pictures.Add(pic);
ImgShape = slide.Shapes.AddPictureFrame(iImageIndex, 200, 400, 500, 700);
}
pres.Write("D:\\Aspose Data\\NewPres.ppt");
Thanks and Regard,