We have: Uncaught Error: The toDataURL method can be used only with jsZip 2. Either include jsZip 2 or use the toDataURLAsync method.
and we have:
so i implement a function SpreadSheetOnexcelExport on excelExport event:
$.SpreadSheetOnexcelExport = function(){
var args = arguments[0];
var options = args.sender.options;
var wb = args.workbook;
var wbX = new kendo.ooxml.Workbook(wb)
var dataURL = wbX.toDataURLAsync();
wbX.toDataURLAsync().then(function(dataURL) {
kendo.saveAs({
dataURI: dataURL,
fileName: options.excel.fileName
});
});
args.preventDefault();
}
The problem is that, for fileName, I have no way to use the file name, selected by the user:
var
nameInput = $(
'.k-spreadsheet-window input[data-bind="value: name"]'
);
var
name = nameInput.val();