If you can read an Excel using JavaScript, as long as you use the JavaScript File API or the .xls (x) is on the same server as your page, then you would use Ajax to get as a string.
After reading with File or with Ajax you can use this lib: link
An example usage: link , example usage:
Reading a file that is on the same server (host, port, and protocol) with Ajax:
var req = new XMLHttpRequest();
req.open("GET", url, true);
req.responseType = "arraybuffer";
req.onload = function(e) {
var data = new Uint8Array(req.response);
var workbook = XLSX.read(data, {type:"array"}); //Faz o "parse"
};
req.send();
With File API:
//A variavel file se refere ao elemento <input type="file">
var rABS = typeof FileReader !== 'undefined' && FileReader.prototype && FileReader.prototype.readAsBinaryString;
var reader = new FileReader();
var name = file.name; //Nome do arquivo vindo do input
reader.onload = function(e) {
var data = e.target.result;
var wb, arr;
var readtype = {type: rABS ? 'binary' : 'base64' };
if(!rABS) {
arr = fixdata(data);
data = btoa(arr);
}
function doit() {
try {
wb = XLSX.read(data, readtype); //Faz a leitura/parse
} catch(e) { console.log(e); }
}
if(e.target.result.length > 1e6) opts.errors.large(e.target.result.length, function(e) { if(e) doit(); });
else { doit(); }
};
if(rABS) reader.readAsBinaryString(file);
else reader.readAsArrayBuffer(file);