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

Free Support Forum - aspose.com

Check background colour of cell


I am using Desktop.Grid along with VB.Net.

I want to insert a row depending on the existing background colour of a cell.

ie. If sheet.cells() = [backgroundcolour] then insert blank row etc.

How do I find out the background colour of a cell?


Bob Hamill

Hi Bob,

Thanks for considering Aspose.

May the following code helps you for your need.

Dim sheet As Aspose.Grid.Desktop.Worksheet = GridDesktop1.Worksheets(0)
Dim cell As Aspose.Grid.Desktop.GridCell = sheet.Cells("A1")
If (cell.GetStyle().Color = Color.Red) Then
End If
Thank you.

Thanks very much again Amjad.

Your work really is appreciated


Bob Hamill