php PHPExcel split Excel cell coordinate
currently, I used PHPExcel to import excel file,
there is a function $cell->getCoordinate();
I would like to ask any solution for spli开发者_开发百科t the cell coordinate alphabet
and integer
?
e.g A1, A2,
I need to know currently which row, and until which column.
I do some research about split, but not luck for it. Any idea?
This:
$coord = 'AF13';
preg_match_all('~[A-Z]+|\d+~', $coord, $split);
print_r($split);
Will produce:
Array (
[0] => Array (
[0] => AF
[1] => 13
)
)
$coordinate = PHPExcel_Cell::coordinateFromString('A1');
var_dump($coordinate);
精彩评论