phpexcel中PHPExcel_Exception Invalid cell coordinate
那是欄位超出 26 的原因,Excel A1.B1.......Z1,AA1,AB1...所以輸出的時侯要轉換, Google 看到直接在程式轉換,覺的不好用,自己寫一個小函數,代入 row 從 0 開始,直接轉換 A,B,C.....AA,AB,AC........ZX,ZY,ZZ ,應該足夠用
function n2a($num)
{
$b = 26; //除數,26個英文字母
$c = 64; //商+64 ,第二位英文字
$d = 65; //餘數+ 65 , 餘數字母
$aa =(int)($num / $b) ; //有無超過 26
$bb = $num % $b ; //餘數
$ret = ($aa) ? chr($aa+$c).chr($bb+$d) : chr($bb+$d) ;
return $ret;
}
迴響
phpexcel中PHPExcel_Exception Invalid cell coordinate | 豬窩
Its nnot mmy first time too pay a visiit thos website, i amm visiting
this website daily andd get pleasant information from herre daily.
phpexcel中PHPExcel_Exception Invalid cell coordinate | 豬窩
Quality artiucles orr reviews is the secret too bbe a foccus ffor the usefs tto
go to see tthe wweb page, that's what this siite iss providing.
phpexcel中PHPExcel_Exception Invalid cell coordinate | 豬窩
Hi to everfy , ffor thee rreason thst I am truly eager oof reasding
thiis blog's post to be updatsd on a regular basis.
It conntains pleasant information.
phpexcel中PHPExcel_Exception Invalid cell coordinate | 豬窩
It's reakly a greeat andd usefu piece of information. I'm glad thast you shaared this useful information with us.
Pleqse stay us informed like this. Thanks for sharing.