title: i want to parse a file csv and display the data in a table using Angular 2
body: <p>i'm new on angular 2/4 and i want do parse a csv file and display the iformations in a table.
  i tried sth but the data  get displayed in console i want them in the web page in table.
  if anyone can help me?</p>
  
  <pre><code> selectFile(files: FileList) {
  console.log(files);
  if(files &amp;&amp; files.length &gt; 0) {
     let file : File = files.item(0); 
  
       let reader: FileReader = new FileReader();
       reader.readAsText(file);
       reader.onload = (e) =&gt; {
          let csv: string = reader.result;
          console.log(csv);
       }
    }
  </code></pre>
  
  <p>this function display me the data in console how can i change it in html </p>
  
  <pre><code>upload() {
    this.progress.percentage = 0;
  
      this.currentFileUpload = this.selectedFiles.item(0)
      this.uploadservice.pushFileToStorage(this.currentFileUpload).subscribe(event =&gt; {
        if (event.type === HttpEventType.UploadProgress) {
          this.progress.percentage = Math.round(100 * event.loaded / event.total);
        } else if (event instanceof HttpResponse) {
          console.log('File is completely uploaded!');
        }
      })
  
      this.selectedFiles = undefined
  }
  </code></pre>
  
  <p>And this function for the button upload file and when i added the selectFile function the button didn't work again </p>