title: How can I read .xlsx row using javascript and convert it to .json file
body: <p>I have some trouble on on converting my code to .json file.</p>
  <pre><code>document.getElementById('button').addEventListener(&quot;click&quot;, () =&gt; {
  XLSX.utils.json_to_sheet(data, 'out.xlsx');
  if(selectedFile){
      let fileReader = new FileReader();
      fileReader.readAsBinaryString(selectedFile);
      fileReader.onload = (event)=&gt;{
       let data = event.target.result;
       let workbook = XLSX.read(data,{type:&quot;binary&quot;});
       console.log(workbook);
       workbook.SheetNames.forEach(sheet =&gt; {
            let rowObject = XLSX.utils.sheet_to_row_object_array(workbook.Sheets[sheet]);
            console.log(rowObject);
            document.getElementById(&quot;jsondata&quot;).innerHTML = JSON.stringify(rowObject,undefined,4)
       });
      }
  }
  </code></pre>
  <p>});</p>
  <p>Also I need to read xlsx file per row and convert it as a .json file
  Thanks for the help!</p>