Free Support Forum -

Foreground color Issue

Hi ,

Please find the excel file which is generated by using aspose tool.
I want to apply lightgray color to worksheet cells where there is no data.


Foregroundcolor for entire sheet1

Thanks in advance

Hi Aparna,

Please try:

Excel excel = new Excel();

excel.ChangePalette(Color.LightGray, 55);

Cells cells = excel.Worksheets[0].Cells;

for(int i = 0; i < 256; i ++)
cells.Columns[(byte)i].Style.ForegroundColor = Color.LightGray;
cells.Columns[(byte)i].Style.Pattern = BackgroundType.Solid;