title: Excel with NPOI: Get the style (backgroundcolor) of a Cell
body: <p>I am using NPOI to parse an Excel-File with C# (VS 2013). I want to get the backgroundcolor of a cell and I am doing this:</p>
  
  <pre><code>IEnumerator rows = sheet.GetRowEnumerator();
  
  while (rows.MoveNext())
  {
      IRow row = (IRow)rows.Current;
  
      foreach (ICell cell in row.Cells)
      {
          if (cell.CellStyle.FillBackgroundColor == 64)
          {
              ...
          }
      }
  }
  </code></pre>
  
  <p>Problem is, that regardless of the background-color of the cell (yellow, green, no color at all), the value of FillBackgroundColor ist always 64. So it seems, that isn't the place, where the color is stored. How do I get it then?</p>
  
  <p>Edith says: The cell.CellStyle.Index property differs for all cells</p>
  
  <p>Thanks in advance, 
  Frank</p>