Get Range (Named) from cell Coordinat

Topics: Developer Forum, User Forum
Nov 29, 2011 at 12:30 PM

Hi

I notice that phpexcel doesn't have a method for getting the name of range from cell coordinates, So I added this method in PHPExcel file for doing this:

    public function rangeNameCell($cellCoor)
    {
        foreach ($this->_namedRanges as $key=>$range)
        {
           // echo $range->getName().'---'.$range->getRange().'--'.$cellCoor;
            if($range->getRange()==$cellCoor) {
                return $range->getName();
                break;
            }
        }
    }

Am I correct or there is another method for doing that?