列标字符转化

数字转字符

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

字符转数字

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