title: EmberJs error for excel parser
body: <p>I am trying to integrate ember with electron and used XLSX parser inside services to read my local excel file, but when I am injecting it to my route, I am getting this error. Please help.</p>
  
  <p>My service file:</p>
  
  <pre><code>   import Ember from 'ember';
  const remote=require('electron').remote;
  const fs=remote.require('fs');
  const XLSX = require('xlsx');
  var f = "c:\\Users\\rajeev\\Downloads\\Tableau\\SuperStoreUS_2015.xlsx";
  
  
  export default Ember.Service.extend({
  
  
      ExcelToJson:function(f){
  
          var workbook = XLSX.readfile(f.toString());
          var worksheet=workbook.Sheets['Orders'];
          alert(worksheet);
                              }
  
  });
  </code></pre>
  
  <p>My Route file where I am injecting the service:</p>
  
  <pre><code>      import Ember from 'ember';
      export default Ember.Route.extend({
      sheet: Ember.inject.service('sheet'),
      message: 'test',
      actions: {
  
          pressButton: function() {
              let sheet=Ember.get(this,'sheet').ExcelToJson();
              var testText = this.get('sheet').ExcelToJson();
              this.set('message',testText);
          }
  
          }
  });
  </code></pre>
  
  <p>My template file:</p>
  
  <pre><code>&lt;button class="button" {{action "pressButton"}}&gt;press&lt;/button&gt;
  </code></pre>
  
  <p>Error when running on electron:</p>
  
  <pre><code>   TypeError: Cannot read property 'toString' of undefined
      at Class.ExcelToJson (serviceeg.js:544)
      at Class.pressButton (serviceeg.js:516)
      at Router.triggerEvent (vendor.js:39675)
      at trigger (vendor.js:67017)
      at Router.trigger (vendor.js:68617)
      at Class.send (vendor.js:38863)
      at Class.send (vendor.js:42875)
      at vendor.js:22521
      at Object.flaggedInstrument (vendor.js:29424)
      at vendor.js:22520
  </code></pre>