We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Images extracted from Excel are thumbnails

I have an Excel document which contains some pictures. I want to use Aspose.Cells to extract a picture from excel, but I found that the extracted picture is a thumbnail, not the original picture.

void Main()
	string filePath = @"C:\Users\54390\Downloads\2022年最美评选-c4403bd51c9d4847ba489a6077513472.xlsx";
	var workbook = new Aspose.Cells.Workbook(filePath);
	var pictureList = new List<Aspose.Cells.Drawing.Picture>();
	foreach(var picture in pictureList){

Version info:

Aspose.Cells for Net 23.1.1

The demo file:

2022年最美评选-c4403bd51c9d4847ba489a6077513472.zip (1.8 MB)

The screenshot:

20230301220744.png (20.1 KB)

I entered the resource directory of this Excel file and found that the width and height of the original picture are actually very large.
20230301221131.png (56.6 KB)

ok,we will investigate it

Thank you, waiting for your reply.

If you want to get original width of pictures, please use Picture.OriginalWidth as the following codes:

Workbook workBook = new Workbook(dir + "2022年最美评选-c4403bd51c9d4847ba489a6077513472.xlsx");
Picture pic = workBook.Worksheets[0].Pictures[0];
byte[] data = pic.Data;//original data
File.WriteAllBytes(dir + "dest.jpg", data);

OK,Thank you very much!


You are welcome. Should you have further queries or issue, feel free to write us back.