Free Support Forum -

Problem with pictures size


I use the worksheet.Pictures.add(myCell,myImagePath,100,100) method to insert images in my worksheet.

In the result excel file my image hasn't the good dimension : the dimension are height : 126% and width : 101% (I obtain this dimensions with a right click on the image in my excel file)

I get the same result if I use the worksheet.Pictures.add(myrow,myImagePath) method .

Have you an idea of what is wrong ?

Thanks for your help


I forgot to say that I use the 3.9.0 version of aspose.cells.


Hi Isabelle,

Could you please post your image file here? I will check it right now.

How do you want that I post you my Image file ? by email ?


You can post your image file here. Please scroll down and you can find how to add an attachment file here. Your attached file can only be downloaded by Aspose members.


Here is one of the pictures that I use in my excel file...

And here is the excel file that I have in result…

Hi Isabelle,

I use the following piece of code to test with your image file:

Workbook workbook = new Workbook();

workbook.Worksheets[0].Cells.SetRowHeight(10, 96);
for(int i = 0; i < 20; i ++)
workbook.Worksheets[0].Cells.SetColumnWidth((byte)i, 8.86);

workbook.Worksheets[0].Pictures.Add(10, 0, "d:\\test\\cumu.png"); // I changed the name of image file to "cumu.png"

The dimension in v3.9 are 101% height and 101%width. Please try the following version. Now it's 100% height and 100% width.

If you still have this problem, please post your sample code and template file here. Thank you very much.