How do I download excel file at an angular 6
The file sent to my angular from C# as an array of bytes by webApi
The required format is .xlsx
downloadFile(result, fileName) {
var byteArray = new Uint8Array(atob(result).split('').map(char => char.charCodeAt(0)));
var blb = new Blob([byteArray], { type: EXCEL_TYPE });
FileSaver.saveAs(blb, fileName);
}
(resulat = c# byte array)