1👍
✅
onchange you’ve to upload the excel sheet in formData
getExcelData(e) {
const formData = new FormData();
const file = e.target.files[0];
formData.append('file', file);
axios.post('url', formData)
.then(response => {
//Code to play with api response with excel data
})
.catch(error => {
//Catch errors
});
}
Source:stackexchange.com