Free Support Forum - aspose.com

Picture fill of a shape not working in .xlsx format

Hello!

We have problems saving Aspose.Cells .NET workbooks in .xlsx format - shapes with picture fills are empty (with incorrect solid fills), there’re no images attached to the .xlsx file as well. But everything is working well in the old Excel97To2003 format.

Sample code:
Bitmap image = new Bitmap(path);
ar shape = _workbook.Worksheets[0].Shapes.AddRectangle(0, 1, 0, 1, 1, 1);
shape.Placement = PlacementType.FreeFloating;
shape.LineFormat.IsVisible = false;
var ms = new MemoryStream();
image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
shape.FillFormat.ImageData = ms.ToArray();
shape.FillFormat.Transparency = 0.5;
_workbook.Save(outputPdfFilenameFullPath, Aspose.Cells.SaveFormat.Xlsx);

Thank you in advance for your help.

Hi,


Yes, I noticed Shape’s fill with a picture is not supported in XLSX, it works fine in XLS fine.

I have logged your issue with an id: CELLSNET-29797. We will figure it out soon.

Thank you.