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

Discussion in 'XML' started by sed_y, Feb 15, 2012.

  1. sed_y

    sed_y

    Joined:
    Jun 30, 2011
    Messages:
    6
    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
    sed_y, Feb 15, 2012
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,496
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  2. Nalina Vemparala via .NET 247

    Web service in .net not able to create Excel com object

    Nalina Vemparala via .NET 247, Apr 17, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    208
    freekamel
    May 21, 2004
  3. Kamaljeet Saini
    Replies:
    0
    Views:
    407
    Kamaljeet Saini
    Feb 13, 2009
  4. HP
    Replies:
    9
    Views:
    170
    Big and Blue
    Jan 2, 2006
  5. kroger@princeton.edu
    Replies:
    7
    Views:
    374
    Mick White
    Feb 2, 2005
Loading...

Share This Page