title: how to convert blob data to downloadable excel/CSV file in react js
body: <p><strong>i am getting a blob from the Get API</strong> <a href="https://i.stack.imgur.com/kEhYU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kEhYU.png" alt="click here to see the format"></a>
  with response shown here <a href="https://i.stack.imgur.com/uqSxd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uqSxd.png" alt="response"></a>
  logic to create file like so after getting the response.</p>
  
  <pre><code>const url = URL.createObjectURL(new Blob([result], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }))
        const link = document.createElement('a');
        link.href = url;
        link.innerText = 'Open the array URL';
        link.setAttribute('download', 'myExcel.xlsx');
        link.click();
  </code></pre>
  
  <p>its creating corrupted excel file.</p>