//获取对应的excel横坐标
public function getExcelCoordinates($coordinate)
{
$alpha = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
$coordinate = $coordinate/1-1;
if($coordinate>24)
{
$first = bcdiv($coordinate,24);
$second = $coordinate%24;
$h = $alpha[$first].$alpha[$second];
}else{
$h = $alpha[$coordinate];
}
return $h;
}
11-08
4637
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)