-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
Thanks for the Update on IE10, One more suggestion is to handle the Base64 conversion with in the code. Currently you have given an option to paste the Base64 string, can this be dynamically generated via the code accessing the variable "f" in the below code snippet?
function b64it(xlsxFile) {
var xlsx = XLSX.readFile(xlsxFile, {type: 'file'});//<--How the base64 conversion should be handled
process_xlsx(xlsx);
}
function handleDrop(e) {
e.stopPropagation();
e.preventDefault();
var files = e.dataTransfer.files;
var i,f;
for (i = 0, f = files[i]; i != files.length; ++i) {
b64it(f);//<-- f represents one of the files in the List
/*
var reader = new FileReader();
var name = f.name;
reader.onload = function(e) {
var data = e.target.result;
//var xlsx = XLSX.read(data, {type: 'binary'});
var arr = String.fromCharCode.apply(null, new Uint8Array(data));
var xlsx = XLSX.read(btoa(arr), {type: 'base64'});
process_xlsx(xlsx);
};
//reader.readAsBinaryString(f);
reader.readAsArrayBuffer(f);
*/
}//for
}//handleDrop
Metadata
Metadata
Assignees
Labels
No labels