title: I export my data to Excel but i get this error: Cannot read properties of undefined (reading 'editing')
body: <p>I Want to export my material table data to Excel but when I click to download I get error in console:
  Cannot read properties of undefined (reading 'editing')</p>
  <p>(I use  &quot;xlsx&quot;: &quot;^0.18.0&quot;)</p>
  <pre><code>&lt;div onClick={downloadExcel} className=&quot;downloadExcel&quot;&gt;
        &lt;img src=&quot;/assets/excel-svgrepo-com.svg&quot; /&gt;
  &lt;/div&gt;
  </code></pre>
  <p>and my downloadExcel function is:</p>
  <pre><code>  const downloadExcel = () =&gt; {
      const newData = Apiary.map((row) =&gt; {
        delete row.tableData;
        return row;
      });
      const workSheet = XLSX.utils.json_to_sheet(newData);
      const workBook = XLSX.utils.book_new();
      XLSX.utils.book_append_sheet(workBook, workSheet, &quot;students&quot;);
      //Buffer
      let buf = XLSX.write(workBook, { bookType: &quot;xlsx&quot;, type: &quot;buffer&quot; });
      //Binary string
      XLSX.write(workBook, { bookType: &quot;xlsx&quot;, type: &quot;binary&quot; });
      //Download
      XLSX.writeFile(workBook, &quot;لیست زنبورستان.xlsx&quot;);
    };
  </code></pre>
  <p>when I onClick img  my react is freeze and stop
  How can I fix this error?</p>