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},
]
})