I am trying to import an excel sheet with multiple columns having different set of data and display it in a react component.
Currently i am doing,
<ReactFileReader handleFiles={this.handleFiles} fileType={'.xlsx'}>
<button>Import</button>
</ReactFileReader>
and then
handleFiles = files =>{
var fileDisplayArea = this.refs.fileDisplayArea;
var reader = new FileReader();
reader.onload = function(e){
fileDisplayArea.innerHTML = reader.result;
}
reader.readAsText(files[0], 'utf-8');
}
Although this imports the file but when rendered it displays all garbage characters. Any help would be much appreciated.
Thanks,
Vikram