Generation

generate functionThu, 06 Apr 2023

borrar todos las celdas que tienen la palabra 'FI' en phpexcel

foreach($worksheet->getRowIterator() as $row) { $cellIterator = $row->getCellIterator(); $cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set foreach ($cellIterator as $cell) { if(strtolower($cell->getValue()) == 'fi'){ $cell->setValue(''); } } }

Questions about programming?Chat with your personal AI assistant