Not able to display color in excel not able to display color in excel using xml


Joined
Jun 30, 2011
Messages
6
Reaction score
0
Hi, I have the following code for a text displayed in excel cell.

Code:
<style Halign="center" Valign="center" wrapText="true" includeAlign="true" includeFont="true" includeBorder="true">
    Pass_indicator
    <font  font="Arial" size="12" bold="true" italic="true" underline="None" Color = "Red" />
  </style>

When I Call this code from C# as
Code:
AddCellHeaderRowStyle_color(bool2str(PassFailStatusOverAll), 2, htBaseFormat, data);

where the function definition is as below
Code:
 private void AddCellHeaderRowStyle_color(string cellValue, int column, Hashtable htBaseFormat, ArrayList rowData)
{
    Hashtable htModifiedFormat = (Hashtable)htBaseFormat.Clone();
    htModifiedFormat[Common.COLUMNCOUNT] = column.ToString();
    htModifiedFormat[Common.ROWHEIGHT] = "36";
    htModifiedFormat[Common.STYLENAME] = "Pass_indicator";
    rowData.Add(cellValue);
    rowData.Add(htModifiedFormat);
}

in excel file, The text changes as I change the size, bold, italic attributes but not the color. I tried changing color to "#00FF00", putting it before other attributes but nothing works. .

Help needed please
sedy
 
Ad

Advertisements


Top