title: Issue setting integer value in Excel with NPOI
body: <p>I have an Excel row where I need to write <code>5</code> using NPOI in the first column and <code>7.0</code> in the second column. Writing those values is quite simple, but when I need to write both in the same row, the <code>5</code> is formatted as <code>5.0</code>.</p>
  
  <p>To write <code>5</code>, I use:</p>
  
  <pre><code>public static void SetCellValue(IRow row)
  {
      var cell = row.CreateCell(1); // column 1
      int value = 5;
      cell.SetCellType(CellType.Numeric);
      cell.SetCellValue(value); 
  
      // 5 is written
  }
  </code></pre>
  
  <p>To write <code>7.0</code>, I use:</p>
  
  <pre><code>public static void SetCellValue(IRow row)
  {
      var cell = row.CreateCell(2); // column 2
      int value = 7;
      cell.SetCellType(CellType.Numeric);
      cell.SetCellValue(value); 
  
      var dataFormat = cell.Sheet.Workbook.CreateDataFormat();
      var strFormat = "0.0";
      cell.CellStyle.DataFormat = dataFormat.GetFormat(strFormat); 
  
      // 7.0 is written
  }
  </code></pre>
  
  <p>To write <code>5</code> and <code>7.0</code>, I'm using:</p>
  
  <pre><code>public static void SetCellValue(IRow row)
  {
      var cell1 = row.CreateCell(1); // column 1
      int value1 = 5;
      cell1.SetCellType(CellType.Numeric);
      cell1.SetCellValue(value1); 
  
      var cell2 = row.CreateCell(2); // column 2
      int value2 = 7;
      cell2.SetCellType(CellType.Numeric);
      cell2.SetCellValue(value2); 
  
      var dataFormat = cell2.Sheet.Workbook.CreateDataFormat();
      var strFormat = "0.0";
      cell2.CellStyle.DataFormat = dataFormat.GetFormat(strFormat); 
  
      // 5.0 and 7.0 is written and not 5 and 7.0
  }
  </code></pre>
  
  <p><br/>
  Any suggestions? I've tried to format the first element (number <code>5</code>) using formats like <code>var strFormat = "0";</code> and <code>var strFormat = "#";</code> but it remains as <code>5.0</code> and not as <code>5</code></p>
  
  <p><br/>
  Additional note: I'm using <a href="https://npoi.codeplex.com/releases/view/115353" rel="nofollow">NPOI version 2.1.1</a></p>