Can't change cell background color after upgrading from Excel to Cells

Following line stopped working after upgrading from Aspose.Excel to Aspose.Cells

Worksheet.Cells[startRow,col].Style.ForegroundColor=Color.DarkBlue;

Background color stays white, no matter what I assign.

Could you please help.

Thanks!

Igor

Hi Igor,

Thanks for considering Aspose.

Well, In Aspose.Cells, You can implement cell background color only if cell's pattern is other than none(default) or solid.

You can add a line with your line of code:

Worksheet.Cells[startRow,col].Style.ForegroundColor=Color.DarkBlue;

Worksheet.Cells[startRow,col].Style.Pattern=BackgroundType.Solid;

Regards

Amjad Sahi

Aspose Nanjing Team

Thanks! It's fine now