src/ExcelHelper.php
public static function getExcelColumnNumber($letters) {
		$num = 0;
		$arr = array_reverse(str_split($letters));
		$arrSize = count($arr);

		for ($i = 0; $i < $arrSize; $i++) {
			$num += (ord(strtolower($arr[$i])) - 96) * (pow(26, $i));
		}
		return $num;
	}
public static function getExcelColumnNumber($letters) {
		$num = 0;
		$arr = array_reverse(str_split($letters));
		$arrSize = count($arr);

		for ($i = 0; $i < $arrSize; $i++) {
			$num += (ord(strtolower($arr[$i])) - 96) * (pow(26, $i));
		}
		return $num;
	}
public static function getExcelColumnNumber ( $ letters ) { $ num = 0 ; $ arr = array_reverse ( str_split ( $ letters ) ) ; $ arrSize = count ( $ arr ) ; for ( $ i = 0 ; $ i < $ arrSize ; $ i ++ ) { $ num += ( ord ( strtolower ( $ arr [ $ i ] ) ) - 96 ) * ( pow ( 26 , $ i ) ) ; } return $ num ; }
Converts Excel-like column names to numbers
@param string $letters
@return int
Converts Excel - like column names to numbers