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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top