我正在使用
PHPExcel从xls文件中读取一些数据.
我想立刻得到几个细胞,说:A6 – A11.
我知道我可以使用$cell = $objPHPExcel-> setActiveSheetIndex(0) – > getCell(‘A6’);得到一个单元格,我可以循环遍历一个数组,并获得我的范围内的每个单元格.
有
原文链接:https://www.f2er.com/php/132414.htmlrangeToArray()
方法:
$objPHPExcel->setActiveSheetIndex(0)->rangeToArray('A1:C3');
想知道为什么我首先记录这些方法,但这里也是参数列表:
/** * Create array from a range of cells * * @param string $pRange Range of cells (i.e. "A1:B10"),* or just one cell (i.e. "A1") * @param mixed $nullValue Value returned in the array entry * if a cell doesn't exist * @param boolean $calculateFormulas Should formulas be calculated? * @param boolean $formatData Should formatting be applied to cell values? * @param boolean $returnCellRef False - Return a simple array of rows * and columns indexed by number counting * from zero * True - Return rows and columns indexed by * their actual row and column IDs * @return array */