react-excel-renderer
react-excel-renderer copied to clipboard
add ability to choose ws
Hi, I added the ability to choose specific worksheet. That can be handy when you have more than one worksheet, the default is steel the first worksheet.
const fileHandler = (event) => {
let fileObj = event.target.files[0];
//just pass the fileObj as parameter
ExcelRenderer(fileObj, (err, resp) => {
if(err){
console.log(err);
}
else{
debugger;
console.log(resp)
}
}, 4);
}
const fileHandler = (event) => {
let fileObj = event.target.files[0];
//just pass the fileObj as parameter
ExcelRenderer(fileObj, (err, resp) => {
if(err){
console.log(err);
}
else{
debugger;
console.log(resp)
}
}, "worksheet-name");
}
#38
#21