标签:isp nload angular 技术 ref 技术分享 time() click col
this.httpClient.post(url1, JSON.parse(data1) , {responseType: ‘blob‘}).subscribe(data => { const link = document.createElement(‘a‘); const blob = new Blob([data], {type: ‘application/vnd.ms-excel‘}); link.setAttribute(‘href‘, window.URL.createObjectURL(blob)); link.setAttribute(‘download‘, ‘Inventory‘ + new Date().getTime() + ‘.xls‘); link.style.visibility = ‘hidden‘; document.body.appendChild(link); link.click(); document.body.removeChild(link); }); }
标签:isp nload angular 技术 ref 技术分享 time() click col
原文地址:https://www.cnblogs.com/lshan/p/9810032.html