title: Uncaught ReferenceError: XLSX is not defined on drop file
body: <p>I want to be able to drag and drop an excel file, but for some reason when declaring my workbook <code>var workbook = XLSX.read(data, {type: rABS ? 'binary':'array'});</code> it says it's not defined. </p>
  
  <p>I think I'm missing something to connect this index.js to server.js which has the <code>var XLSX = require('xlsx');</code> in it. I've looked and looked online and haven't found the right fix. I would like to avoid using a module to <code>require()</code> inside of HTML. </p>
  
  <p>What I think is the important code:</p>
  
  <p>server.js: </p>
  
  <pre><code>var express = require("express");
  var app = express();
  var XLSX = require('xlsx');
  var fs = require('fs');
  var JSON = require('JSON');
  var path = require('path');
  </code></pre>
  
  <p>index.js:</p>
  
  <pre><code>$(document).ready(function(){
  var rABS = true; // true: readAsBinaryString ; false: readAsArrayBuffer
      $excelHolder.on('drop', function(e){
          e.preventDefault();
          var files = e.originalEvent.dataTransfer.files;
          var file = files[0];
          var reader = new FileReader();
          console.log("got to before reader");
          reader.onload = function (e) {
              console.log("got to reader.onload");
              var data =e.target.result;
              var workbook = XLSX.read(data, {type: rABS ? 'binary':'array'});
  
              var sheet_name_list = workbook.SheetNames;
              var excelObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheet_name_list[0]]);
              var json = JSON.stringify(excelObj);
              var callback = "looks like it worked";
              console.log("did it upload?");
  
              fs.writeFile('excelfile.json', json, function(err){
                  (err) ? console.error(err) : console.log(callback.toString());
              });
              // preview?
          };
          if(rABS) reader.readAsBinaryString(file); else reader.readAsArrayBuffer(file);
  
      });
  }
  </code></pre>
  
  <p>index.html:</p>
  
  <pre><code>&lt;div class="huge"&gt;22&lt;/div&gt;
     &lt;div&gt;Uploads!&lt;/div&gt;
     &lt;input name="uploads[]" type="file" accept=".xls,.xlsx,.ods,.csv" style="display: none;" id="excelInput"&gt;
  </code></pre>
  
  <p>Any help is much appreciated.</p>