I have some issues with saving xlsx
in my Angular2 app:
this._http.get('/api/file).subscribe(success=>{
var blob = new Blob([success.json()], {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
});
var downloadUrl= window.URL.createObjectURL(blob);
window.open(downloadUrl);
}, error=>{
});
The response I receive from backend is in the following form:
PK�q�H_rels/.rels���j�0��}
�{㴃1F�^Ơ�2��l%1I,c�[��3�l
l�����H��4��R�l��·����q}*�2�������;�*��
t"�^�l;1W)�N�iD)ejuD�cKz[:}g����@:�.... etc
Any ideas where I am doing mistake?