Column index transform

Number column index to string

1
var_dump(\Vtiful\Kernel\Excel::stringFromColumnIndex(0)); // A
2
var_dump(\Vtiful\Kernel\Excel::stringFromColumnIndex(28)); // AC
Copied!

String column index to number

1
var_dump(\Vtiful\Kernel\Excel::columnIndexFromString('A')); // 0
2
var_dump(\Vtiful\Kernel\Excel::columnIndexFromString('AC')); // 28
Copied!
Last modified 2yr ago