Professional Documents
Culture Documents
Excelfrom String Data
Excelfrom String Data
this.httpClient.get(this.excelDownloadUrl).subscribe(fileData => {
//fileData will be a JSON String with a 'name' and 'file' key in which
the 'file' key contains two parts, the 2nd part is
the base64 encoded data, so we have to first decode it using 'atob()'
function in Javascript
// console.log(atob(fileData["file"].split("base64,")[1]))
FileSaver.saveAs(file);
this.httpClient.get(this.excelDownloadUrl,{responsetype: 'blob' as
'blob'}).subscribe(fileData => {