Login   Register  
PHP Classes

Small Bug about Cellname

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Simple XLSX  >  All threads  >  Small Bug about Cellname  >  (Un) Subscribe thread alerts  
Subject:Small Bug about Cellname
Summary:Bug on Cellname
Author:Daniel Stastka
Date:2013-09-25 11:55:04
Update:2013-10-13 07:50:06

  1. Small Bug about Cellname   Reply  
Picture of Daniel Stastka
Daniel Stastka
2013-09-25 11:55:04
The name after "Z" are false. I add my function to convert Excel Colums to the right Name. "A...B...C ...Z... AA... AB.... AC...." etc.

----- Replace Code:
'name' => $this->CellNameNumToAlpha($i+1).($curR+1),

------ Add new function:

function CellNameNumToAlpha($n)
$str = "";

for($r = ""; $n >= 0; $n = intval($n / 26) - 1)
$r = chr($n%26 + 0x41) . $r;
return $r;

Greatings from Zurich

  2. Re: Small Bug about Cellname   Reply  
Picture of Sergey Shuchkin
Sergey Shuchkin
2013-10-13 07:50:06 - In reply to message 1 from Daniel Stastka