So, my problem I suppose is quite easy, but I have ... some issue with it :)
So in my application written in Django I invoke creating Excel file using Ajax like this :
$.ajax({
url: '/ajax-send-xls-desktop/',
type: 'POST',
contentType: "application/vnd.ms-excel",
data: JSON.stringify(data_xls),
dataType: 'text',
success: function(result) {
window.open('data:application/vnd.ms-excel,' + result);
}
});
In my backend I create Excel file and return response like this one :
response = HttpResponse(mimetype="application/vnd.ms-excel")
response['Content-Disposition'] = 'attachment; filename=opispozycji.xls'
response['Content-Type'] = 'application/vnd.ms-excel; charset=utf-8'
book.save(response)
Everything I received is a lot of characters :
N*8X"��1���Arial1���Arial1���Arial1���Arial1���Arial1���Arial1���Arial1���Arial
�General���� �� ���� �� ���� �� ���� �� ���� �� ���� �� ���� �� ���� �� ���� �� ���� ��
���� �� ���� �� ���� �� ���� �� ���� �� ���� �� �� �� �� �� �� �� ���`��Opis pozycji��
PDane wygnerowane przez Interzam - Internetowa Platforma Zarzdzania Zam�wieniamiSIDCPV
Can anyone confirm that the problem lies in charset encoding ?