Free Support Forum -

How can i exctract pictures from cells

is it possible ?



This message was posted using Page2Forum from Adding Pictures - Aspose.Cells for .NET


Please see the code below and source xlsx file, the code extracts a picture from the source file and save it on hard disk.

Please use the latest version:
Aspose.Cells for .NET v7.0.1.5

I have attached the output picture also.


string filePath = @“F:\Shak-Data-RW\Downloads\source.xlsx”;

Workbook workbook = new Workbook(filePath);

Worksheet worksheet = workbook.Worksheets[0];

var pic = worksheet.Pictures[0];

byte[] picBytes = pic.Data;

File.WriteAllBytes(filePath + “.out.” + pic.ImageFormat.ToString(), picBytes);

Output Image: