public function set_h_align($location) {
        switch ($location) {
            case 'left':
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_LEFT;
                break;
            case 'center':
            case 'centre':
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;
                break;
            case 'right':
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;
                break;
            case 'justify':
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY;
                break;
            default:
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
        }
    }
public function set_h_align($location) {
        switch ($location) {
            case 'left':
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_LEFT;
                break;
            case 'center':
            case 'centre':
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;
                break;
            case 'right':
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;
                break;
            case 'justify':
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY;
                break;
            default:
                $this->format['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
        }
    }
public function set_h_align ( $ location ) { switch ( $ location ) { case 'left' : $ this -> format [ 'alignment' ] [ 'horizontal' ] = PHPExcel_Style_Alignment :: HORIZONTAL_LEFT ; break ; case 'center' : case 'centre' : $ this -> format [ 'alignment' ] [ 'horizontal' ] = PHPExcel_Style_Alignment :: HORIZONTAL_CENTER ; break ; case 'right' : $ this -> format [ 'alignment' ] [ 'horizontal' ] = PHPExcel_Style_Alignment :: HORIZONTAL_RIGHT ; break ; case 'justify' : $ this -> format [ 'alignment' ] [ 'horizontal' ] = PHPExcel_Style_Alignment :: HORIZONTAL_JUSTIFY ; break ; default : $ this -> format [ 'alignment' ] [ 'horizontal' ] = PHPExcel_Style_Alignment :: HORIZONTAL_GENERAL ; } }
Set the cell horizontal alignment of the format.

@param string $location alignment for the cell ('left', 'right', 'justify', etc...)
Set the cell horizontal alignment of the format .