Problem with color after upgrading to Cells


This morning I installed Aspose.Cells 3.7.2. I've changed the namespace on my page (using .NET) and any references to Aspose.Excel. Now anywhere I'm setting the foreground color does not work. It shows as white.

Here is my code:

If Not Excel.IsColorInPalette(Color.LightGray) Then
Excel.ChangePalette(Color.LightGray, 55)
End If

If Not Excel.IsColorInPalette(Color.LightBlue) Then
Excel.ChangePalette(Color.LightBlue, 54)
End If

intStyleIndex = Excel.Styles.Add()
style = Excel.Styles(intStyleIndex)
style.Font.Name = "Arial"
style.Font.Size = 8
style.Number = 3

style.HorizontalAlignment = TextAlignmentType.Right
style.Borders(BorderType.TopBorder).LineStyle = CellBorderType.Thin
style.Borders(BorderType.BottomBorder).LineStyle = CellBorderType.Thin
style.Borders(BorderType.LeftBorder).LineStyle = CellBorderType.Thin
style.Borders(BorderType.RightBorder).LineStyle = CellBorderType.Thin
style.ForegroundColor = Color.LightBlue
style.Name = "DataStyleBlue"


SARCells(intRow, CType((intNextCol), Byte)).Style = SARExcel.Styles("DataStyleBlue")


Embarrassed [:$]Sorry I missed the post about setting the pattern to solid. That fixed it!!


Please add a line of code after setting the back color:

style.ForegroundColor = Color.LightBlue

style.Pattern = BackgroundType.Solid

In previous version we set the pattern automatically when setting the color. However, we found that this may cause problem in some cases while importing Excel files. So we changed the routine.