title: How to write data into an xls sheet in js
body: <p>I am able to write data into an xls sheet but not in a proper mannaer ,pls see the pic below</p>
  
  <p><a href="https://i.stack.imgur.com/drMYw.png" rel="nofollow noreferrer">My xls sheet</a></p>
  
  <p>My code,</p>
  
  <pre><code>var readString = '';
        readString = "Name"+"\t"+" From"+"\t"+" Created By"+"\t"+" Reminder Date"+"\t"+" Reminder Time"+"\n";
        event.forEach(function (v, i) {
          readString += v.attributes.task_name+"\t";
          readString += v.attributes.context_type+"\t";
          readString += v.created_by.employee.name+"\t";
          readString += v.attributes.reminder_date+"\t";
          readString += v.attributes.reminder_time+"\t";
          readString += "\n";
        });
        var currTime = new Date().getTime();
        var filePath = "./modules/upload/excel/task_" + currTime + ".xls";
        //studentInfo.filePath = "task_" + currTime + ".xls";
        var writeStream = fs.createWriteStream(filePath);
        writeStream.write(readString);
        writeStream.close();
  </code></pre>
  
  <p>Can anyone please help me.Thanks.</p>