title: How can i get the data From FileReader() onload
body: <p>I am converting excel data to json using XLSX and have to send the received data from onload to other functions. The conversion of excel to json is working just file.</p>
  <pre><code> var files = e.target.files;
      var f = files[0];
      var reader = new FileReader();
  
      reader.onload = e =&gt; {
          var data = new Uint8Array(e.target.result);
          var workbook = XLSX.read(data, { type: &quot;array&quot; });
          let sheetName = workbook.SheetNames[0];
         
          console.log(workbook);
          let worksheet = workbook.Sheets[sheetName];
          console.log(&quot;insde&quot;, XLSX.utils.sheet_to_json(worksheet));
  
  
           console.log(XLSX.utils.sheet_to_json(worksheet))
          
      };
  
      reader.readAsArrayBuffer(f);
  </code></pre>
  <p>i just want to send  <code>XLSX.utils.sheet_to_json(worksheet)</code> as data in other function
  Thank your for your help :) .</p>