You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* In the `onChange` handler, invoke the `ExcelRenderer` function and provide file object from the event handler to the `ExcelRenderer` function to obtain JSON data from sheet
23
+
```
24
+
fileHandler = (event) => {
25
+
let fileObj = event.target.files[0];
26
+
27
+
//just pass the fileObj as parameter
28
+
ExcelRenderer(fileObj, (err, resp) => {
29
+
if(err){
30
+
console.log(err);
31
+
}
32
+
else{
33
+
this.setState({
34
+
cols: resp.cols,
35
+
rows: resp.rows
36
+
});
37
+
}
38
+
});
39
+
32
40
}
33
-
});
34
41
```
35
42
* Use the OutTable component to render obtained JSON data into HTML table, and provide classnames as props to make table look alike an Excel Sheet
0 commit comments