title: NPOI doesn't apply format to .xls
body: <p>C#, NPOI</p>
  
  <p>Good evening, i'm trying to fill in an empty template with values(numbers, but in string variable), that needs to be in cells.</p>
  
  <p>So, when it came to formatting, i've stuck with styling. That means, when i wrote the value inside(in pre-formatted cell) i get just the string value, that was in array.</p>
  
  <p>But, when i open file, click "edit cell", then apply without any changes, then cell is formatted, with the format, which was in a template</p>
  
  <p>I tried to apply previous style in cell(basically just copy style in var, before setting a value, then re-apply style), but, it didnt help.</p>
  
  <p><a href="https://youtu.be/sRAD1xQq3hs" rel="nofollow noreferrer">Here</a> is the video of my doings</p>
  
  <pre><code>var cr = new CellReference(cellAndValue[i, 0]);
  var row = sheet?.GetRow(cr.Row);
  var cell = row?.GetCell(cr.Col);
  var prevtype = cell.CellType;
  var prevstyle = cell.CellStyle;
  var dataformat = cell.CellStyle.DataFormat;
  CellType type = cell.CellType;
  cell.SetCellValue(cellAndValue[i, 0]);
  </code></pre>
  
  <p>How to resolve that?)</p>