I have trouble reading the Uploaded File (XLSX) via FileReader API's "readAsBinaryString" method in IE10. "readAsText" method works fine. Has anyone come across this, does IE support this method? Am I missing something. Pls find the snippet below:
function handleFileUpload(evt){
evt.stopPropagation();
evt.preventDefault();
var files = (evt.target.files || evt.dataTransfer.files);
var output = [];
for (var i = 0, f; f = files[i]; i++) {
output.push('<li><strong>', escape(f.name), '</strong> (', f.type || 'n/a', ') - ', f.size, ' bytes, last modified: ', f.lastModifiedDate ?
f.lastModifiedDate.toLocaleDateString() : 'n/a', '</li>');
var reader = new FileReader();
reader.onload = function(e) {
var data = e.target.result;
alert("-- Data Length --" + data.length);
};
// Read in the XLSX file in Binary Mode.
//reader.readAsBinaryString(f);//<-- ***does not work if this method is used in IE10 (10.0.9200.16540C0), but works on Chrome***
reader.readAsText(f);//<-- ***Works on both Chrome & IE10 (10.0.9200.16540C0)***
}//for
}//handleFileUpload