these days I started with PHP-Presentation. I load a presentation and try to remove the value form a cell. But there is no function to clear a cell.
I've just found addText()
and createText()
.
public function modTable($slide = null){
$shapes = $slide->getShapeCollection();
foreach($shapes as $shape){
if(get_class($shape) == "PhpOffice\\PhpPresentation\\Shape\\Table") {
if($shape->getName()){
$shape->getRow(1)->getCell(0)->createTextRun("-TEST1-");
$shape->getRow(1)->getCell(0)->getParagraph(0)->createText("-TEST2-");
}
}
}
}