async imp() {
const input = document.createElement('input');
input.type = 'file';
input.setAttribute("accept", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,.csv");
input.click();
await new Promise(resolve => input.addEventListener('change', resolve, { once: true }));
this.excelData = new FormData();
this.excelData.set('file', input.files[0]);
this.excelName = input.files[0].name;
}
downLoad() {
let excel: any = this.excelData.get("file");
var aLink = document.createElement('a');
aLink.download = excel.name;
aLink.style.display = 'none';
var blob = new Blob([excel]);
aLink.href = URL.createObjectURL(blob);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
}
生成10万条数据的表格