I have the similar problem here. It looks like the aspose.excel doesn’t support some system color like the Color.Lime and Color.DarSeaGreen. But some others are fine
MS Excel has a default color palette. If you use a color which is not in the default color palette, you have to change the palette first. Please check `http://www.aspose.com/Products/Aspose.Excel/Api/Aspose.Excel.Excel.ChangePalette.html`.
And I think you want to use Foreground color to set font color and use Background color to set background color. Actually, in MS Excel, Background color only take effect when the background pattern is not solid.
I am almost there but not there yet; I changed the palette accordingly; I used the worksheet.Cells.Rows[0].Style.Font.Color = System.Drawing.Color.Bisque;
to set the fore color, which is exactly what I need. But, the problem is with the background color of the cells; If I use the
for the background it shows the AliceBlue color as a background but it also paints the cell borders in this color which effectively makes them invisible.
then the cell’s back color does not change (it is because it only takes effect when the background pattern is not solid, as you mentioned in your message). But, I need to use the BackgroundColor to maintain the borders visible.
to paint the cell’s area, its background, both the cell’s area and its border are drawn in the foreground color (the ForgroundColor acts almost like the background color). As such, the cell’s border is invisible for it is drawn in the foreground color, as the rest of the cell’s area is, despite the fact that the border is set to thin is becomes invisible.
In other words, using the ForegroundColor to paint the cell’s area, its backgound, paints the cell’s barder with the foreground color as well making it invisible regardless of the cell’s border style.
it will not work. If I use the VerticalStripe pattern that is exactly what i am going to get, cells with a striped background. If I set the pattern to solid then black background is painted. Finally, if I set the pattern to none then white background is painted.
<br>I am having a problem highlighting cells :<br> cells[i+1,j+2].Style.BackgroundColor = System.Drawing.Color.Yellow;<br><br>This did not change the color. and when i add this at the beginning of the code:<br> excel1.ChangePalette(Color.Yellow, 51);<br>It just makes the cells totally white.<br><br><br>Someone can help with this please ?<br><br>Thanks.<br>
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.