how to import data from excel to html table using javascript code example
Example: read excel file using javascript html
var XLSX = require('xlsx');
var workbook = XLSX.readFile('test.xlsx');
function handleFile(e) {
var files = e.target.files, f = files[0];
var reader = new FileReader();
reader.onload = function(e) {
var data = new Uint8Array(e.target.result);
var workbook = XLSX.read(data, {type: 'array'});
};
reader.readAsArrayBuffer(f);
}
input_dom_element.addEventListener('change', handleFile, false);