title: Laravel Excel is working but the file cannot be opened
body: <p>I am using the <a href="https://laravel-excel.com/" rel="nofollow noreferrer">Laravel Excel</a> to create excel documents with many sheets. I have been following their example of how they do it, but when I go to download the file its:</p>
  <blockquote>
  <p>Excel cannot open the file 'kingdoms (1).xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.</p>
  </blockquote>
  <p>I am unsure why.</p>
  <p>So heres how I do it:</p>
  <h2>Controller Method:</h2>
  <pre><code>public function export() {
      return Excel::download(new KingdomsExport, 'kingdoms.xlsx', \Maatwebsite\Excel\Excel::XLSX);
  }
  </code></pre>
  <h2>Export Class</h2>
  <pre><code>class KingdomsExport implements WithMultipleSheets {
  
      use Exportable;
  
      /**
       * @return array
       */
      public function sheets(): array {
          $sheets   = [];
  
          $sheets[] = new BuildingsSheet;
  
          // .. other commented out sheets.
  
          return $sheets;
      }
  }
  </code></pre>
  <h2>Buildings Sheet</h2>
  <pre><code>class BuildingsSheet implements FromView, WithTitle, ShouldAutoSize {
  
      /**
       * @return View
       */
      public function view(): View {
          return view('admin.exports.kingdoms.sheets.buildings', [
              'buildings' =&gt; GameBuilding::all(),
          ]);
      }
  
      /**
       * @return string
       */
      public function title(): string {
          return 'Buildings';
      }
  }
  </code></pre>
  <h2>Buildings view</h2>
  <pre><code>&lt;table&gt;
      &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;name&lt;/th&gt;
          &lt;th&gt;description&lt;/th&gt;
          &lt;th&gt;max_level&lt;/th&gt;
          &lt;th&gt;base_durability&lt;/th&gt;
          &lt;th&gt;base_defence&lt;/th&gt;
          &lt;th&gt;required_population&lt;/th&gt;
          &lt;th&gt;units_per_level&lt;/th&gt;
          &lt;th&gt;only_at_level&lt;/th&gt;
          &lt;th&gt;is_resource_building&lt;/th&gt;
          &lt;th&gt;trains_units&lt;/th&gt;
          &lt;th&gt;is_walls&lt;/th&gt;
          &lt;th&gt;is_church&lt;/th&gt;
          &lt;th&gt;is_farm&lt;/th&gt;
          &lt;th&gt;wood_cost&lt;/th&gt;
          &lt;th&gt;clay_cost&lt;/th&gt;
          &lt;th&gt;stone_cost&lt;/th&gt;
          &lt;th&gt;iron_cost&lt;/th&gt;
          &lt;th&gt;time_to_build&lt;/th&gt;
          &lt;th&gt;time_increase_amount&lt;/th&gt;
          &lt;th&gt;decrease_morale_amount&lt;/th&gt;
          &lt;th&gt;increase_population_amount&lt;/th&gt;
          &lt;th&gt;increase_morale_amount&lt;/th&gt;
          &lt;th&gt;increase_wood_amount&lt;/th&gt;
          &lt;th&gt;increase_clay_amount&lt;/th&gt;
          &lt;th&gt;increase_stone_amount&lt;/th&gt;
          &lt;th&gt;increase_iron_amount&lt;/th&gt;
          &lt;th&gt;increase_durability_amount&lt;/th&gt;
          &lt;th&gt;increase_defence_amount&lt;/th&gt;
      &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
      @foreach($buildings as $building)
          &lt;tr&gt;
              &lt;td&gt;{{$building-&gt;name}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;description}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;max_level}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;base_durability}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;base_defence}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;required_population}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;units_per_level}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;only_at_level}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;is_resource_building}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;trains_units}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;is_walls}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;is_church}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;is_farm}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;wood_cost}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;clay_cost}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;stone_cost}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;iron_cost}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;time_to_build}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;time_increase_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;decrease_morale_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;increase_population_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;increase_morale_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;increase_wood_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;increase_clay_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;increase_stone_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;increase_iron_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;increase_durability_amount}}&lt;/td&gt;
              &lt;td&gt;{{$building-&gt;increase_defence_amount}}&lt;/td&gt;
          &lt;/tr&gt;
      @endforeach
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  <p>I can't see anything wrong here with any of this, yet the file cannot be opened. I have tried to open it with <code>vi</code> but it's all gibberish. If I try and download as csv, it opens fine. but as I plan to have multiple sheets, it doesn't seem to include them with csv files.</p>
  <p>I do have other sheets, but for simplicity I commented them out to see if one of them was having an issue. Alas even with just one sheet, it still won't open. <strong>Is it something wrong with how I download the excel file?</strong></p>