title: Validate empty cells Angular Xlsx file
body: <p>Good morning I have a problem, I am loading an xlxs file, I read the file without problems, but if the loaded file has an empty cell I should show an error message indicating that there are one or more empty cells.</p>
  <p><em><strong>Function to read my file</strong></em></p>
  <pre><code>import * as XLSX from 'xlsx';
  onFileChange (evt: any) {
      const data: [] [];
      const target: DataTransfer = &lt;DataTransfer&gt; (evt.target);
      if (target.files.length! == 1) throw new Error ('Cannot use multiple files');
      const reader: FileReader = new FileReader ();
      reader.onload = (e: any) =&gt; {
        const bstr: string = e.target.result;
        const wb: XLSX.WorkBook = XLSX.read (bstr, {type: 'binary'});
        const wsname: string = wb.SheetNames [0];
        const ws: XLSX.WorkSheet = wb.Sheets [wsname];
  
        this.data = (XLSX.utils.sheet_to_json (ws, {header: 1, defval: null}));
        console.log (&quot;data:&quot;, this.data);
        // I apply slice to skip the headers.
        let x = this.data.slice (3);
       console.log (&quot;x:&quot;, x);
      };
  
      reader.readAsBinaryString (target.files [0]);
  
    }
  </code></pre>
  <p><em><strong>Image of the data extracted from the archive</strong></em>
  <a href="https://i.stack.imgur.com/VEM3b.png" rel="nofollow noreferrer">Image of the data extracted from the archive</a></p>
  <p><em><strong>Format of my exce file
  l</strong></em>
  <a href="https://i.stack.imgur.com/ktUp6.png" rel="nofollow noreferrer">Format of my exce file</a></p>
  <p>Here comes my question, how could I perform a validation that allows me to save all null values ​​in a list or something similar, and then show the error message to the user or if you have any other solution to solve my problem, thank you very much.</p>