I need to make a slight change to the PHP Excel Reader library; http://code.google.com/p/php-excel-reader/
I want to add support for vertical-alignment of cells (top, middle, bottom).
Here’s how the normal alignment is detected:
$alignbit = ord($data[$pos+10]) & 3;
And here is the excel 2003 format specification:
http://sc.openoffice.org/excelfileformat.pdf
I’m not sure if this is the correct setting:
Does anyone know what bit I need to get (similar to the $alignbit) in order to get the vertical alignment? (1 of 6 possibilities)


Thanks,
Wesley
Personally I’d use
rather than
because you can then match the mask (0x07) up with the spec definition more obviously
Using the same principle, vertical alignment is bits 6-4, mask 0x70, so
PS. Why are you still using Open Office’s partial spec, when Microsoft have published the full specification