From the JSP page, I need to browse excel file and after selecting file on system, I need to read that excel file contents and fill my form.
Currently I have tried
This one works in all major browsers.
https://catamphetamine.github.io/read-excel-file/
import readXlsxFile from 'read-excel-file'
const input = document.getElementById('input')
input.addEventListener('change', () => {
readXlsxFile(input.files[0]).then((data) => {
// `data` is an array of rows
// each row being an array of cells.
})
})
In the example above data is raw string data.
It can be parsed to JSON with a strict schema by passing schema argument. See API docs for an example of that.
API docs: http://npmjs.com/package/read-excel-file