title: Export to Excel on Angular 4
body: <p>I have a data table that is dynamically populated using Angular 4. I would like to export the table to excel. How can I achieve this in Angular 4. 
  I'm looking for .xls and not .csv.</p>
  
  <p>PS: I don't want to use Jquery libraries. </p>
  
  <p>My app-component looks like this,</p>
  
  <pre><code>    &lt;table id ="dataTable" class = "table table-hover"&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;th&gt;Date&lt;/th&gt;
            &lt;th&gt;Address&lt;/th&gt;
            &lt;th&gt;Mode&lt;/th&gt;
            &lt;th&gt;Distance&lt;/th&gt;
            &lt;th&gt;Fare&lt;/th&gt;
            &lt;th&gt;&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr *ngFor="let date of dateList;let i = index"&gt;
            &lt;td&gt;{{date}}&lt;/td&gt; 
            &lt;td&gt;{{address}}&lt;/td&gt;
            &lt;td&gt;{{mode}}&lt;/td&gt;
            &lt;td&gt;{{distance}}&lt;/td&gt;
            &lt;td&gt;{{fare}}&lt;/td&gt;
            &lt;td&gt;
               &lt;a&gt;Delete&lt;/a&gt;
            &lt;/td&gt;   
        &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>