function setTextRotation($angle)
    {
        switch ($angle)
        {
            case 0:
                $this->_rotation = 0;
                break;
            case 90:
                if ($this->_BIFF_version == 0x0500) {
                $this->_rotation = 3;
                } elseif ($this->_BIFF_version == 0x0600) {
                    $this->_rotation = 180;
                }
                break;
            case 270:
                if ($this->_BIFF_version == 0x0500) {
                $this->_rotation = 2;
                } elseif ($this->_BIFF_version == 0x0600) {
                    $this->_rotation = 90;
                }
                break;
            case -1:
                if ($this->_BIFF_version == 0x0500) {
                $this->_rotation = 1;
                } elseif ($this->_BIFF_version == 0x0600) {
                    $this->_rotation = 255;
                }
                break;
            default :
                return $this->raiseError("Invalid value for angle.".
                                  " Possible values are: 0, 90, 270 and -1 ".
                                  "for stacking top-to-bottom.");
                $this->_rotation = 0;
                break;
        }
    }