Aspose 4.0.1.3 makes my Date columns all white (no grid lines)- unlike version 3.9.0.1

Laurence, when I upgraded to Aspose 4.0.1.3 (from 3.9.0.1), the Excel cells formatted as “m/d/yyyy h:mm” no longer have the Excel default grid lines. Everything looks whited-out.

Could you tell me in what situation they are lost? A sample file and code will help me to figure out your problem.

The problem was triggered by what it appears to be a change in our Aspose initializes a new Style object. With version 3.9.0.1, if I add a Style and then get this Style at index 0, the Style object's foreground color had a Name of "White". With version 4.0.1.3, the Style object's foreground color Name is "ffffffff". In both cases, the ARGB is (255,255,255,255), as one would expect.

Our application changes the foregound colors of some cells. If a caller requests that the cell foreground color change to a certain value, then the code checks whether the cell foreground color was ever "initialized", and if it was, then the pattern is set to Solid and the new foreground color is assigned to the Style. The challenge is in determining whether the cell foregound color was ever initialized!

We were branching based on whether the new value was System.Drawing.Color.White or System.Drawing.Color.Empty, which worked for Aspose 3.9.0.1 but not Aspose 4.0.1.3.

I made changes to our code so that everything works now.

Checking background pattern is better to determine if a cell’s foreground color is ever “initialized”.