Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前,我使用PHPExcel导入excel文件,有一个功能$cell->getCoordinate();
$cell->getCoordinate();
我想问任何拆分单元格坐标的解决方案alphabet和integer?
alphabet
integer
例如 A1、A2、
我需要知道当前是哪一行,直到哪一列。
我做了一些关于分裂的研究,但不是运气。任何的想法?
这:
$coord = 'AF13'; preg_match_all('~[A-Z]+|\d+~', $coord, $split); print_r($split);
将产生:
Array ( [0] => Array ( [0] => AF [1] => 13 ) )
$coordinate = PHPExcel_Cell::coordinateFromString('A1'); var_dump($coordinate);