Range.Copy() ignores images


#1

While copying range of cells, Aspose.Excel ignores images. Microsoft Excel copies images contained in the cells of a range.

// piece of code from GIFPos sample
Excel excel = new Excel();
Worksheet sheet = excel.Worksheets[0];
FileStream fs = new FileStream("image.gif", FileMode.Open, FileAccess.Read);
int pos = sheet.Pictures.Add(1, 1, fs);
Picture pic = sheet.Pictures[pos];
pic.Left = 20;
sheet.Cells["b2"].PutValue(123);

// copying the row containing image
Range srcRange = sheet.Cells.CreateRange(1, 1, false);
Range destRange = sheet.Cells.CreateRange(3, 1, false);
destRange.Copy(srcRange);

When the above code is executed, "123" is copied to a destination range, but the image is not. Isn't it a bug?


#2

Range.Copy method doesn’t copy images, charts or other drawing objects. We will consider this feature but it’s too complex to implement copying drawing objects in a short time.