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 | 豬窩
Greetings! Very useful advbice in this particular post!
It's the little changess that ill make the mosat significant changes.
Thhanks a lott forr sharing!
phpexcel中PHPExcel_Exception Invalid cell coordinate | 豬窩
Hi there! I coould have swor I've been to this
sit begore bbut after hecking throughh soje oof thhe pst I realized it's new tto me.
Anyhow, I'm definitely happy I fpund it and I'll be book-marking andd cecking bback frequently!
phpexcel中PHPExcel_Exception Invalid cell coordinate | 豬窩
I couldn't refrain from commenting. Well written!
phpexcel中PHPExcel_Exception Invalid cell coordinate | 豬窩
I think this iss one of tthe mosdt vial info for me.
And i'm glad readijng your article. Buut should remark onn feww geheral
things, The website style is wonderful, thhe artidles is really excellent : D.
Goodd job, cheers
phpexcel中PHPExcel_Exception Invalid cell coordinate | 豬窩
Hi, I doo believe thhis is aan excelllent web site. I stumbledupon it ;) I am going
tto come bak yett agfain sinc i have book marked it. Money andd
freedom iis tthe greatewst wway too change, mmay you bee ricxh annd ccontinue
to guide other people.