title: Excel file not being written to
body: <p>I am trying to write to an Excel file using openXML. I followed <a href="https://docs.microsoft.com/en-us/office/open-xml/how-to-insert-text-into-a-cell-in-a-spreadsheet" rel="nofollow noreferrer">Microsoft's example</a> to do it. There's only a small difference with the code being that I wish to write number values instead of text.</p>
  <p>See the code below :</p>
  <pre><code>public void SetSpreadSheet(string filePath)
          {
              sprdSheet = SpreadsheetDocument.Open(filePath, true);
  
              wrkBook = sprdSheet.WorkbookPart;
  
              wrkSheet = wrkBook.AddNewPart&lt;WorksheetPart&gt;();
              wrkSheet.Worksheet = new Worksheet(new SheetData());
              wrkSheet.Worksheet.Save();
  
              sheets = wrkBook.Workbook.AppendChild(new Sheets());
  
              sheet = new Sheet() { Id = wrkBook.GetIdOfPart(wrkSheet), SheetId = 1, Name = &quot;test&quot; };
              sheets.Append(sheet);
          }
  </code></pre>
  <p>Here I use <code>SpreadsheetDocument.Open</code> instead of creating a new one because I aim to write to an existing Excel template in the future.</p>
  <pre><code>public void AddData(float data, string columnName, UInt32 rowIndex)
          {
              var row = new Row() { RowIndex = rowIndex };
              wrkSheet.Worksheet.AppendChild(row);
  
              Cell cell = InsertCellInWorksheet(columnName, rowIndex, wrkSheet);
              cell.CellValue = new CellValue(data);
              cell.DataType = new EnumValue&lt;CellValues&gt;(CellValues.Number);
  
              wrkSheet.Worksheet.Save();
          }
  </code></pre>
  <p>There is another method called <code>InsertCellInWorksheet</code> which I took from MSDN example (and decided to not include since it is quite long).</p>
  <p>I tested these methods using the following programm:</p>
  <pre><code>        int column = 10;
          int row = 5;
          var rnd = new Random();
  
          var xl = new Xl();
          xl.SetSpreadSheet(@&quot;path to the file .xlsx&quot;);
          
          for(int c = 1; c &lt;= column; c++)
          {
              for(int r = 1; r &lt;= row; r++)
              {
                  var columnName = Number2String(c, true);
                  xl.AddData(rnd.Next(10), columnName, (uint)r);
              }
          }
  
          Console.WriteLine(&quot;FINISHED&quot;);
          Console.ReadLine();
  </code></pre>
  <p>And the result that I get is an empty Excel spreadsheet.
  In the MSDN example they use a <code>SharedStringTablePart</code> to write to the Excel spreadsheet, is there an object akin to it that I should use to write numerical data ?</p>
  <p><strong>UPDATE</strong></p>
  <p>Following mcalex' comment i tried using <a href="https://github.com/ClosedXML/ClosedXML" rel="nofollow noreferrer">ClosedXML</a> and succeeded in doing just what I wanted to do. However, I'm still interested in understanding why my file is not being written to so feel free to answer the question.</p>