We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cell shading got removed while setting table style

I wanted to create a table with background Red colour and cell in 1x1 position in Yellow colour. After setting the cell shading background colour of 1x0 cell is removed.

Code used

TableStyle tableStyle = (TableStyle)doc.getStyles().add(StyleType.TABLE, "TableStyleTest");
tableStyle.getShading().setBackgroundPatternColor(Color.RED);
builder.startTable();

for (int i = 0; i < 4; i++)
{
    for (int j = 0; j < 4; j++)
    {
        builder.insertCell();
        builder.write("Row " + (i + 1) + ", Column " + (j + 1));
    }
    builder.endRow();
}

Table table = builder.endTable();
table.setStyle(tableStyle);
table.getRows().get(1).getCells().get(1).getCellFormat().getShading().setBackgroundPatternColor(Color.YELLOW);

Find the attachment.

@vibinkrishnadas42
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-24995

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.