title: PHPSpreadsheet - How do create a extra tab?
body: <p>I create in my php code a excel file with one tab and give it a name.
  The code what i use is this.:</p>
  
  <pre><code>// CREATE PHPSPREADSHEET OBJECT
  require "../vendor/autoload.php";
  use PhpOffice\PhpSpreadsheet\Spreadsheet;
  use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
  use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
  
  // CREATE A NEW SPREADSHEET + POPULATE DATA
  $spreadsheet = new Spreadsheet();
  $sheet = $spreadsheet-&gt;getActiveSheet();
  $sheet-&gt;setTitle('Batch');
  </code></pre>
  
  <p>But how do i create a second tab with another name?</p>
  
  <p>[solved]</p>
  
  <pre><code>// CREATE A NEW SPREADSHEET + POPULATE DATA
  $spreadsheet = new Spreadsheet();
  $sheet = $spreadsheet-&gt;getActiveSheet();
  $sheet-&gt;setTitle('Batch');
  // Add some data
  $spreadsheet-&gt;createSheet();
  // Add some data
  $spreadsheet-&gt;setActiveSheetIndex(1) -&gt;setCellValue('A1', 'world!');
  // Rename worksheet
  $spreadsheet-&gt;getActiveSheet()-&gt;setTitle('URL Removed');
  // Set active sheet index to the first sheet, so Excel opens this as the first sheet
  $spreadsheet-&gt;setActiveSheetIndex(0);
  </code></pre>