ExcelViewer Data loading.

I’m trying to load the ExcelViewer component dynamically by sending the contents of an excel file.

This is my response object:
flask.Response(response=compress(result), content_type=‘application/vnd.openxmlformats-officedocument.spreadsheetml.sheet’, headers={‘Content-Encoding’ : ‘gzip’})

This successfully downloads the file to my downloads folder as well.

However the ExcelViewer Component is not able to parse this. On debugging further i found out that the data is being received looks like binary data and hence excelViewer is not able to parse this.

This is my JS code:

var myProxy = webix.proxy(“binary”, “get_excel_sheet”)
//
ui = webix.ui({
rows:[
{ view:“excelbar”, id:“toolbar” },
{ view:“excelviewer”, id:“excel”, toolbar:“toolbar”, excelHeader:true,url: myProxy},
]
})

How is the data expected in ExcelViewer Component:
Webix code:
webix.protoUI({
name:“excelviewer”,
$init:function(){
this.$ready.push(function(){
if (this._settings.toolbar)
webix.$$(this._settings.toolbar).attachEvent(“onExcelSheetSelect”, webix.bind(this.showSheet, this));
});
},
defaults:{
datatype:“excel”
},
$onLoad:function(data){
if(data.sheets){
this._excel_data = data;
if (this._settings.toolbar)
webix.$$(this._settings.toolbar).setSheets(data.names);
var now = data.names[0];
this.showSheet(now.id || now);
return true;
}
return false;
},

onLoad:function(data) in this what is the data format expected?