PHPOffice/PhpSpreadsheet get cell column index as integer
12,221
Solution 1
please see Accessing cells
$ColumnIndex = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::columnIndexFromString($Column);
Solution 2
If you have a cell then you can use the public functions - getColumn(), getRow(), getCoordinate()
Go read the source in Github
Author by
user08
Updated on June 13, 2022Comments
-
user08 almost 2 years
How can I get cell column index as integer? I have searched the documentation but I didn't found anything.
-
Pierre-Olivier Vares about 3 yearsThis is a first step, which I think OP had found. But getColumn and getCoordinate return strings. OP asked for integer values :)