title: TypeError: Cannot read property 'target' of undefined
body: <p>I am trying to read Excel data file using following function:</p>
  
  <pre><code>handleFiles = (f, evt) =&gt; {
  
      var name = f.name;
      const reader = new FileReader();
      reader.onload = evt =&gt; {
  
        /* Parse data */
        const bstr = evt.target.result;
  
        const wb = XLSX.read(bstr, { type: "binary" });
        console.log("data&gt;&gt;&gt;", wb);
        /* Get first worksheet */
        const wsname = wb.SheetNames[0];
        const ws = wb.Sheets[wsname];
        /* Convert array of arrays */
        const data = XLSX.utils.sheet_to_csv(ws, { header: 1 });
        /* Update state */
        console.log("Data&gt;&gt;&gt;", data);
      };
  
      reader.readAsBinaryString(evt.target.files[0]);
    };
  </code></pre>
  
  <p>And the fuction is called using a button call :</p>
  
  <pre><code>  &lt;Button onClick={this.handleFiles}&gt;UPLOAD&lt;/Button&gt;
  </code></pre>
  
  <p>When calling the function the error is displayed as "TypeError: Cannot read property 'target' of undefined". Is there any solutions for make this error correct?</p>