I want to download xlsx file from the client on angular 2 using rest api.
I\'m getting a byte array as a response from my GET request and I\'m sending it to download
you can use the below code :
var file = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); saveAs(file,"nameFile"+".xlsx"); deferred.resolve(data);