Lets Learn

Opinion Matters

  • Subscribe

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 8 other followers

  • Blog Stats

    • 77,664 hits
  • Ankush

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Projects on Open XML

Posted by Ankush on March 26, 2012


Are you doing any projects on Open XML and SharePoint and need some help.

Then reach out to me..I would love to look into the issues and see if I can be of any help!!!!



One Response to “Projects on Open XML”

  1. Supriya said

    Hi Ankush,I am working on Open XML in wpf.

    I have exported the data in excel using Open XML now I need to add color to the cells of few columns based on cell values.

    I have taken help from the below link to do the exporting: http://justgeeks.blogspot.com/2012/03/writing-large-amounts-of-data-from.html

    Can you help me with the coloring part. My data is in data table.

    sample image: http://tinypic.com/r/2yuwnbl/8

    I was trying to do something like this

    protected void DoColourCell(OpenXmlWriter excelWriter, object value1, uint? styleIndex, string value2)

    cell.DataType = CellValues.Number;
    cell.CellValue.Text = Convert.ToString(value1);
    string s = cell.CellValue.Text;

    if ((value2 ==”A” && s != null) || (value2 == “B” && s != null))
    if (Convert.ToDouble(s) < 1.0)
    //I really don't how should I fill colours to the
    cell based on cell value? what should I do in this part
    I am completely new to open XML .


    if (styleIndex.HasValue)
    cell.StyleIndex = styleIndex.Value;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: