title: Node.js append a row to xlsx file
body: <p>I'm just trying to figure out how to append a single row to an xlsx file. For example, append <code>array = [1 2 3 4 5]</code> to the first empty row using columns 1,2,3,4,5. Ideally I'd start with an empty <code>.xlsx</code> file, and repeatedly rerun this program, which appends a new row to the file each time it is ran.</p>
  
  <p>I'm attempting to use exceljs, but any test writes I try to do to a file say corrupted when I attempt to open them. </p>
  
  <p>edited code (still not working):</p>
  
  <pre><code>var Excel = require('exceljs');
  var workbook = new Excel.Workbook();
  var sheet = workbook.addWorksheet('rssi');                                                                                                                                                                                                  
  file = 'testfile.xlsx'          
  var array = [1,2,3,4,5]
  sheet.addRow(array)
  workbook.xlsx.writeFile(file)
  .then(function() {
      console.log('Array added and file saved.')
  });
  </code></pre>
  
  <p>Output is zero bytes and cannot be opened by Microsoft Excel. Says, "The file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."</p>