我试图在phpexcel中读取一个合并的单元格,我的问题是该单元格在A:B:C:D:E:F上合并(不能违背他们的要求)。
$i= 0;
foreach ($worksheet->getRowIterator() as $row) {
if ($i > 10) break ;
$i ++;
$cellIterator = $row->getCellIterator();
foreach ($cellIterator as $cell) {
if($cell->getColumn()== 'A:B:C:D:E:F'){
$specification=$cell->getCalculatedValue();
var_dump($specification);die();
// some other code
总是输出 null。
我尝试过使用 $cell->getColumn()== 'A'
,因为该单元格从 A 开始,但仍然输出 null。
希望能得到任何帮助。