title: PHPExcel : Data validation not working in .xls format
body: <p>I have a excel file with two sheet:</p>
  
  <ol>
  <li><strong>Worksheet</strong>;</li>
  <li><strong>List</strong>- list of items which will display in <code>Worksheet</code> sheet as a list item.</li>
  </ol>
  
  <p>Please see the below images:</p>
  
  <p><img src="https://i.stack.imgur.com/Ky1A7.png" alt="List">   <img src="https://i.stack.imgur.com/azE0I.png" alt="Worksheet"></p>
  
  <p>I want to generate this using <strong><code>PHPExcel</code></strong> library. I have tried but not getting the expected results. See my below code :</p>
  
  <pre><code>$objPHPExcel = new PHPExcel();
  // Set document properties
  $objPHPExcel-&gt;getProperties()-&gt;setCreator("Soumya Biswas")
                               -&gt;setLastModifiedBy("Soumya Biswas")
                               -&gt;setTitle("Office 2007 XLSX Test Document")
                               -&gt;setSubject("Office 2007 XLSX Test Document")
                               -&gt;setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
                               -&gt;setKeywords("office 2007 openxml php")
                               -&gt;setCategory("Test result file");
  
  
  // Create a first sheet
  $objPHPExcel-&gt;setActiveSheetIndex(0);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('A5', "List");
  
  
  // Set data validation
  $objValidation = $objPHPExcel-&gt;getActiveSheet()-&gt;getCell('B5')-&gt;getDataValidation();
  $objValidation-&gt;setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
  $objValidation-&gt;setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION );
  $objValidation-&gt;setAllowBlank(false);
  $objValidation-&gt;setShowInputMessage(true);
  $objValidation-&gt;setShowErrorMessage(true);
  $objValidation-&gt;setShowDropDown(true);
  $objValidation-&gt;setErrorTitle('Input error');
  $objValidation-&gt;setError('Value is not in list.');
  $objValidation-&gt;setPromptTitle('Pick from list');
  $objValidation-&gt;setPrompt('Please pick a value from the drop-down list.');
  $objValidation-&gt;setFormula1('"$List.$A$1:$A$10"');  // Make sure to put the list items between " and "  !!!
  
  $objPHPExcel-&gt;createSheet();
  $objPHPExcel-&gt;setActiveSheetIndex(1);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setTitle('List');
  
  for ($i = 1; $i &lt;= 10; $i++) {
      $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue("A{$i}", "List Item {$i}");
  }
  // Set active sheet index to the first sheet, so Excel opens this as the first sheet
  $objPHPExcel-&gt;setActiveSheetIndex(0);
  
  
  
  
  header('Content-Type: application/vnd.ms-excel');
  header('Content-Disposition: attachment;filename="data-validation.xls"');
  header('Cache-Control: max-age=0');
  
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
  $objWriter-&gt;save('php://output');
  exit; 
  </code></pre>