title: PHP XLS 2003 (Excel) File - Detecting Cell Vertical Alignment
body: <p>I need to make a slight change to the PHP Excel Reader library; <a href="http://code.google.com/p/php-excel-reader/" rel="nofollow noreferrer">http://code.google.com/p/php-excel-reader/</a></p>
  
  <p>I want to add support for vertical-alignment of cells (top, middle, bottom). </p>
  
  <p>Here's how the normal alignment is detected: </p>
  
  <pre><code>                    $alignbit = ord($data[$pos+10]) &amp; 3;
  </code></pre>
  
  <p>And here is the excel 2003 format specification:</p>
  
  <p><a href="http://sc.openoffice.org/excelfileformat.pdf" rel="nofollow noreferrer">http://sc.openoffice.org/excelfileformat.pdf</a></p>
  
  <p>I'm not sure if this is the correct setting: </p>
  
  <p>Does anyone know what bit I need to get (similar to the $alignbit) in order to get the vertical alignment? (1 of 6 possibilities)</p>
  
  <p><img src="https://i.stack.imgur.com/6EnJ8.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/QN2PW.png" alt="enter image description here">
  Thanks,
  Wesley</p>