title: How to make import excel on ReactJS by tools 'read-excel-file'?
body: <p>I'm a beginner. I think have something is wrong. I try to solve but not work.
  I bring this code from HTML example. 
  Please help me to know : how to write it in reactJS file.
  Thank you very much.</p>
  
  <pre><code>import readXlsxFile from 'read-excel-file';
  import React,{Component} from 'react';
  import ReactDOM from 'react-dom';
  
  class App extends Component{
  
      constructor(props){
          super(props);
  
          const input = document.getElementById('file');
  
  
          input.addEventListener('change', () =&gt; {
          readXlsxFile(input.files[0]).then((data) =&gt; {
              document.getElementById('dtable').innerHTML = '&lt;table border=1&gt;' + data.map(row =&gt; '&lt;tr&gt;' + row.map(cell =&gt; `&lt;td&gt;${cell === null ? '' : cell}&lt;/td&gt;`).join('') + '&lt;/tr&gt;').join('') + '&lt;/table&gt;';
          })
          })
  
      }
  
  
  
      render(){
          return (
              &lt;div&gt;
                  &lt;input type="file" id="file" /&gt;
                  &lt;div id="dtable"&gt;&lt;/div&gt;
              &lt;/div&gt;
  
          ); 
  
      }
  
  }
  
  ReactDOM.render(&lt;App /&gt;,document.querySelector('#root'));
  </code></pre>