CellFormat and InsertImage issue if Cell created through Node.Clone

Hi

I am getting Null reference exception if I try to set a background color of a cell or insert an image into a cell which was created through a Node.Clone function.

I have attached a sample source code Cell Formatting Test.zip (320.4 KB)

@hammadarif

Thanks for your inquiry. We have tested the scenario and noticed the CellFormat.Shading exception. We have logged a ticket WORDSNET-16039 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

Furthermore, in reference to inserting image into cell, please add image as following. It will resolve the issue.

DocumentBuilder builder = new DocumentBuilder((Document)cell.Document);
Shape image = builder.InsertImage(@"D:\Downloads\Cell Formatting Test\Cell Formatting Test\Indicator\Blue.jpg");
cell.FirstParagraph.AppendChild(image);

@hammadarif,

The issues you have found earlier have been fixed in this Aspose.Words for .NET 17.11 update and this Aspose.Words for Java 17.11 update.

Please also check the following articles: