title: Angular 4 - Upload CSV
body: <p>I am making an Angular4 
  I have a button that converts data to a csv file with header.
  Now I want to do it the other way around, I want to upload a csv file.
  So for testing, I make an object and make a csv file from it, and then I want to click on a button and upload that file and get the same result.</p>
  
  <p>I found an angular module to export csv, but I can't find one that does it the other way around. Can someone help me with that?</p>
  
  <p>This is my code:</p>
  
  <p>test.ts</p>
  
  <pre><code>import { Component, OnInit} from '@angular/core';
  import { Angular2Csv } from 'angular2-csv/Angular2-csv';
  import {Unit} from "../../../_shared/unit";
  
  @Component({
    moduleId: module.id,
    templateUrl: 'test.component.html',
    styleUrls: ['./test.css']
  })
  
  
  export class TestComponent implements OnInit {
  
  
  
    ngOnInit() {}
  
    public export() {
      // Unit (id,name,description)
      var data = [new Unit(1,"Unit1","This is unit 1!")];
  
      var options = {
        fieldSeparator: ';',
        quoteStrings: '"',
        decimalseparator: ',',
        showLabels: true,
        useBom: true
      };
      new Angular2Csv(data, "data", options);
    }
  
    public import(){}
  
  }
  </code></pre>
  
  <p>test.html</p>
  
  <pre><code>&lt;button (click)="export()"&gt;Download CSV&lt;/button&gt;
  &lt;button (click)="import()"&gt;Upload CSV&lt;/button&gt;
  </code></pre>