title: How to upload excel file in Javascript or convert excel to text file?
body: <p>I have been working on the upload page for text files, now I would like to upload excel files as well. My current code give me weird output. I assume something is wrong since my function was built for text files and now I have to modify something to read excel files. Here is my file reader code:</p>
  
  <p></p>
  
  <pre><code>function fileSubmit(){
      var fileExist = $('#fileUpload')[0];
      var fileName = $('#fileUpload').val().split('\\').pop();
  
      if(fileName &amp;&amp; fileExist){
          var reader = new FileReader();
          var file = fileExist.files[0];
  
          reader.onload = function(e) {
              var text = reader.result.split(/\r\n|\n/);                 
              var columnNames = text.shift().split('\t'); 
              alert(columnNames); 
          }
          reader.readAsText(file, 'UTF-8');
      }
  }
  </code></pre>
  
  <p>My alert output looks like this:</p>
  
  <pre><code>PK!b�h^�[Content_Types].xml �(����N�0E�H�C�-Jܲ@5��*Q&gt;�ēƪc[�ii����B�j7���{2��h�nm���ƻR����U^7/���%��rZY�@1__�f��q��R4D�AJ�h&gt;����V�ƹ�Z�9����NV�8ʩ����ji){^��-
  </code></pre>
  
  <p>I want to output my columns names because I have to do the validation for each row in the file. What is the best way to get this to work for <code>.xsl</code> and <code>.xsls</code> files? I found many examples with xls and xlxs javascript libraries but none of them worked when I tried to implement for many reason. I'm wondering is there anything that is supported in all browsers or this is something that should not be done in JavaScript? Thank you.</p>