Ok, I tested this too.
From my tests, start from a xlsx where there is inside an image. Use the
InsertRange( CellArea area, int shiftNumber, ShiftType shiftType, bool updateReference );
function to insert a range:
- just under the image or intersecating the image (movedown): the image will move down, in Excel this does not happen.
- just right the image or intersecating the image (moveright): the image will move right, in excel this does not happen.
- just two cell above the image, always move down: the image will stay where it is, in Excel it shifts down
- just two cell left the image, always move right: the image will stay where it is, in Excel it shifts right
This is a problematic behaviour, also illogic. Moreover I noticed, but I couldn’t test it exactly: if there is a cell with data or style under the image, and the image is the bottom right corner, the last two behaviours are not happening,
After this, the other problem is the height problem that it is still present.
If I AddPicture in cell 0,0 the heightscale is correctly 100% when I open it in Excel and inside Aspose.Cells too.
If I AddPicture in cell 1,0 the heightscale is uncorrectly 101% when I open it in Excel and inside Aspose.Cells it is 100%
If I AddPicture in cell 2,0 the heightscale is uncorrectly 102% when I open it in Excel and inside Aspose.Cells it is 100%
etc etc
Until row 10 when it becames 111% instead of 110% inside Excel.
The problem is that if you begin to insertrange after adding a picture this rule screws up and I cant create a formula to correct it. The first formula to correct it that was working without insertrange was:
pict.HeightCM = pict.OriginalHeightCM * ( 100 - 100 / 87 * pict.upperLeftRow ) / 100;
This formula does not work if I insertrange left or over the image.
This height problem happens just with images added trough aspose.
Moreover when I set IsLockAspectRatio to false and I save the file and open it inside Excel, the flag is still true.
I always save as xlsx.
Thanks,
Tommaso