$seriesData = array(
'Monday' => 12,
'Tuesday' => 15,
'Wednesday' => 13,
);
$series = new \PhpOffice\PhpPresentation\Shape\Chart\Series('Downloads', $seriesData);
$lineChart = new \PhpOffice\PhpPresentation\Shape\Chart\Type\Line();
$lineChart->addSeries($series);
$shape = $currentSlide->createChartShape(); // etc.
< /code>
Und dies funktioniert korrekt.$shape = $currentSlide->createTableShape();
$shape->setHeight(800);
// ..etc.
foreach ($datapoints as $datapoint) {
$row = $shape->createRow();
$row->setHeight(100);
$oCell = $row->nextCell();
$oCell->setWidth(240);
// This adds plain text in cell, it works:
$datapointValue = "Some text";
$oCell->createTextRun($datapointValue);
///////
// Instead the plain text I need to somehow add a chart here, with a loop:
// $datapointChart = $this->getMyChart($datapoint); // Chart should be encapsulated in a method like 'getMyChart'
// $oCell->createTextRun($datapointChart);
// .. but I have no idea what should 'getMyChart' return, and which method should I use instead the 'createTextRun' for the cell
///////
}
Grundsätzlich habe ich keine Ahnung, wie ich dies für eine Tabellenzelle verwenden soll (nicht direkt für die Folie):
$ shape = $ currentSlide-> createChartShape ();>
Wenn ich den Dokumenten folge[code]$seriesData = array( 'Monday' => 12, 'Tuesday' => 15, 'Wednesday' => 13, ); $series = new \PhpOffice\PhpPresentation\Shape\Chart\Series('Downloads', $seriesData); $lineChart = new \PhpOffice\PhpPresentation\Shape\Chart\Type\Line(); $lineChart->addSeries($series); $shape = $currentSlide->createChartShape(); // etc. < /code> Und dies funktioniert korrekt.$shape = $currentSlide->createTableShape(); $shape->setHeight(800); // ..etc. foreach ($datapoints as $datapoint) { $row = $shape->createRow(); $row->setHeight(100); $oCell = $row->nextCell(); $oCell->setWidth(240); // This adds plain text in cell, it works: $datapointValue = "Some text"; $oCell->createTextRun($datapointValue); /////// // Instead the plain text I need to somehow add a chart here, with a loop: // $datapointChart = $this->getMyChart($datapoint); // Chart should be encapsulated in a method like 'getMyChart' // $oCell->createTextRun($datapointChart); // .. but I have no idea what should 'getMyChart' return, and which method should I use instead the 'createTextRun' for the cell /////// } [/code] Grundsätzlich habe ich keine Ahnung, wie ich dies für eine Tabellenzelle verwenden soll (nicht direkt für die Folie): $ shape = $ currentSlide-> createChartShape ();>
Wie kann ich ein OLE -Objekt (Excel -Tabelle) in PowerPoint mit Pyautogui und Win32COM in PowerPoint einfügen und die Größe des Einfügens von Paste -Paste -Paste -Paste -Coping -Kopieren einer Excel...