title: Download excel file in angular 7 using a blob url
body: <p>I am trying to download excel file in my angular 7 app using the mime type &quot;<strong>data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,</strong>&quot; but when I'm trying to open the downloaded file it throws me some error saying - <a href="http://prntscr.com/ur1nc4" rel="nofollow noreferrer">http://prntscr.com/ur1nc4</a>.</p>
  <p>Here is what I've done inorder to download the file</p>
  <pre><code>const filePath = &quot;https://bviewstorage.blob.core.windows.net/9be306d9-acb1-4f25-a54f-5126e021ec6d/hrm/aabe5bd4-940a-4246-979c-581fdaa45808/Client_export_1592830934796-94f5d780-4007-4ae6-b802-53f4fe5509f2.xlsx&quot;
  const linkSource = &quot;data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,&quot; + filePath;
          const downloadLink = document.createElement(&quot;a&quot;);
          downloadLink.href = linkSource;
          downloadLink.download = &quot;ExcelTemplate&quot; + this.datePipe.transform(new Date(), &quot;yyyy-MM-dd&quot;) + &quot;.xlsx&quot;;
          downloadLink.click();
  </code></pre>
  <p>I've even try to download the file path &quot;xls&quot; MIME type but still it throws same error.</p>
  <p>Please let me know the ways to download the excel file.</p>