title: Lumen : maatwebsite/excel is not working properly
body: <p>Hello I am using maatwebsite/excel : version 3.0 to save files as <strong>.xls</strong> .</p>
  
  <p>I have added it to my composer.json then ran <code>composer update</code>.</p>
  
  <p>In my bootstrap/app.php I added:</p>
  
  <pre><code>$app-&gt;register(Maatwebsite\Excel\ExcelServiceProvider::class);
  </code></pre>
  
  <p>In my controller I used the following code:</p>
  
  <pre><code>use Maatwebsite\Excel\Facades\Excel;
  Excel::create('Laravel Excel', function($excel)use($data) {
  
  $excel-&gt;sheet('Excel sheet', function($sheet)use ($data) {
                  $sheet-&gt;rows($data);
  });
  })-&gt;store('xls')-&gt;download('xls');
  </code></pre>
  
  <p><code>$data</code> is an array shown below: </p>
  
  <pre><code>Array
  (
      [0] =&gt; stdClass Object
          (
              [srNum] =&gt; 1
              [user_name] =&gt; test user2
              [loggedin_at] =&gt; 2018-05-14 14:06:48
              [username] =&gt; tezzxzser2                
          )
  
      [1] =&gt; stdClass Object
          (
              [srNum] =&gt; 2
              [user_name] =&gt; test user2
              [loggedin_at] =&gt; 2018-05-14 14:18:39
              [username] =&gt; tezzxzser2
  
          )
  
      [2] =&gt; stdClass Object
          (
              [srNum] =&gt; 3
              [user_name] =&gt; test user2
              [loggedin_at] =&gt; 2018-05-15 07:05:14
              [username] =&gt; tezzxzser2
  
          )
  }
  </code></pre>
  
  <p>It is not working and gives me the following error: </p>
  
  <blockquote>
    <p>Target [Illuminate\Contracts\Routing\ResponseFactory] is not
    instantiable.</p>
  </blockquote>
  
  <p>Also, where does it store the excel file when saved?</p>