Set recommended horizontal align.

@throws Exception\InvalidArgumentException

@param string $align can be left|center|right

@return Column
489461
public function setAlign($align)
    {
        if (!is_string($align) || !in_array(strtolower($align), ['left', 'right', 'center'], true)) {
            throw new Exception\InvalidArgumentException(__METHOD__ . ' Align param must be a string : right, left, center.');
        }
        $this->properties['align'] = $align;

        return $this;
    }
997107
public function setMode($mode)
    {
        if ($mode === null) {
            $this->mode = $mode;
            return $this;
        }

        if (!is_string($mode)) {
            throw new InvalidArgumentException(
                'Order Mode must be a string.'
            );
        }

        $mode  = strtolower($mode);
        $valid = $this->validModes();
        if (!in_array($mode, $valid)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid Order Mode. Must be one of "%s"',
                implode('", "', $valid)
            ));
        }

        if (in_array($mode, [ self::MODE_ASC, self::MODE_DESC ])) {
            $this->setDirection($mode);
        }

        $this->mode = $mode;
        return $this;
    }
265540
public function setOrderDirection($direction)
    {

        $direction = strtolower($direction);

        if (!in_array($direction, ['asc', 'desc'])) {
            throw new \InvalidArgumentException('$direction must be "asc" or "desc"');
        }

        $this->orderDirection = $direction;
        return $this;
    }
1161548
public PositionAlignmentOptions setHorizontalAlignment(PositionRelation horizontalAlignment, int offsetLeft)
	{
		switch (horizontalAlignment)
		{
			case LEFT:
			case CENTER:
			case RIGHT:
				break;
			default:
				throw new IllegalArgumentException("Illegal value for the horizontal alignment property");
		}

		this.horizontalAlignment = horizontalAlignment;
		this.offsetLeft = offsetLeft;
		return this;
	}
1137977
public function setColumnFormat($attr, $format = null)
    {
        $formats = is_array($attr)
            ? $attr
            : [$attr => $format];

        foreach ($formats as $a => $f)
            $this->_setSingleColumnFormat($a, $f);

        return $this;
    }
72605
public function setAlignment($alignment) {
        $alignment = intval($alignment);
        if ($alignment !== self::ALIGN_LEFT && $alignment !== self::ALIGN_TOP && $alignment !== self::ALIGN_CENTER && $alignment !== self::ALIGN_RIGHT && $alignment !== self::ALIGN_BOTTOM) {
            throw new CINArgumentException('The text alignment must be one of a valid constant.', 'alignment');
        }

        $this->alignment = $alignment;
    }
311726
public function setEmailFormat($format)
    {
        if (!in_array($format, $this->_emailFormatAvailable)) {
            throw new InvalidArgumentException('Format not available.');
        }
        $this->_emailFormat = $format;

        return $this;
    }
1077110
protected function get_align_string($align) {
        switch ($align) {
            case self::TL :
                return 'tl';
            case self::TR :
                return 'tr';
            case self::BL :
                return 'bl';
            case self::BR :
                return 'br';
            default :
                return 'tl';
        }
    }
282049
public function setLineEnding($lineEnding)
    {
        if (!is_string($lineEnding) || strlen($lineEnding) < 1) {
            throw new \InvalidArgumentException("Invalid line ending specified, must be a string at least 1 character long");
        }

        $this->lineEnding = $lineEnding;

        return $this;
    }
1026103
public function setWidth($width)
    {
        if (!is_null($width)) {
            if (intval($width) < 0) {
                throw new \InvalidArgumentException(sprintf('Invalid width: %d', $width));
            }

            $this->width = intval($width);
        } else {
            $this->width = null;
        }

        return $this;
    }
1021374
public function setVerticalAlign($verticalAlign) {
        if (!in_array($verticalAlign, [static::TOP, static::CENTER, static::BOTTOM], true)) {
            throw new \InvalidArgumentException(
                '$verticalAlign argument must be one of: ImagesGroupConfig::TOP, ImagesGroupConfig::CENTER, ImagesGroupConfig::BOTTOM'
            );
        }
        $this->verticalAlign = $verticalAlign;
        return $this;
    }
1342942
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;
        }
    }
357759
public function setDirection($direction)
    {
        if (!in_array($direction, self::$Supporteddirection)) {
            throw new \InvalidArgumentException(sprintf(
                    '"%s" Is Not Valid Mirror Direction', (string) $direction
            ));
        }
        $this->direction = $direction;

        return $this;
    }
842955
public function setHorizontal($pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL) {
		if ($pValue == '') {
			$pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
		}

		if ($this->_isSupervisor) {
			$styleArray = $this->getStyleArray(array('horizontal' => $pValue));
			$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
		}
		else {
			$this->_horizontal = $pValue;
		}
		return $this;
	}
1313969
public function setType(string $type): self
    {
        if (!\in_array($type, self::COLUMN_TYPES, true)) {
            throw new \InvalidArgumentException('Not supported column type '. $type);
        }

        $this->type = $type;

        return $this;
    }
586746
private function getMappedHorizontalAlign($param)
    {
        switch($param) {
            case 'left':
                $align = \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT;
                break;
            case 'right':
                $align = \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_RIGHT;
                break;
            case 'center':
                $align = \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER;
                break;
            case 'justify':
                $align = \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_JUSTIFY;
                break;
            default:
                $align = \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT;
        }

        return $align;
    }
477550
public function setLineEnding($lineEnding)
    {
        if (!in_array($lineEnding, Ldif::LINE_ENDING)) {
            throw new InvalidArgumentException('The line ending specified is invalid');
        }
        $this->lineEnding = $lineEnding;

        return $this;
    }