-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Presentations break with version 2309 of PowerPoint #758
Comments
@Progi1984 We have the same problem. Is there a way to get the error message from PowerPoint to understand where the problem is coming from? Is there a way to verify the XML output? |
I understand that you are on the preview channel. I check updates from Microsoft : https://learn.microsoft.com/en-us/officeupdates/current-channel-preview. Like it's an insider program, we should wait next versions. |
In our case it is the current version 16.77 (23091001) on Mac (installed from the App Store) and also the online version of Microsoft 365 (https://view.officeapps.live.com/op/view.aspx?src={URL_TO_FILE}). |
@Progi1984 Do you have any ideas? The Mac version of PowerPoint is the current stable one. I don't know the version of the online PowerPoint version. But it used to work there, too, and now it doesn't. Pie charts seem to work, bar charts don't. Is there a way to get the error message from PowerPoint to understand where the problem is coming from? |
Which version of PhpPresentation do you use ? Could you send me a file who run well before and is broken now ? |
Version 0.6.0. This issue is affecting both newly generated files and files that were generated years ago. The example file is linked in the OP. |
We are seeing the same issue as well, and we are using the latest version of PhpPresentation. |
Hi @Progi1984, we use the latest stable version of the framework (1.0). The current development version does not work too. |
You can better replicate this if you try to create a chart: $shape = $slide->createChartShape();
$shape->setName('Chart')
->setResizeProportional(false);
$shape->getPlotArea()->setType($barChart); You'll see that the chart doesn't show up, and it'll ask to repair the powerpoint, which doesn't really repair anything. |
Echoing this experience. Came here to troubleshoot why users of one of the applications we manage suddenly started reporting PowerPoints being broken. Using the latest dev version PHP Presentation. Also confirming that the same problem exists for both new and old PowerPoints in this version. Based on when volumes of reports started coming in, I'd say it is the most recent versions. My computer was running 16.77 which I installed on 20 sept, and experiencing the issue. I'm no PowerPoint coding expert (I rather dislike the repair errors because they are so tedious to troubleshoot...) so not sure if there is a way to better find out what it doesn't like. But it does seem to be a bug in PPT. :( |
Yeah, this is really putting a damper on my projects. We're trying to figure out a solution now. It's just slides with charts that are broken. |
Just switched to the beta track on Mac to confirm that the problem is still there in 16.79.23100109 |
Confirm that powerpoint Version 2309 Build 16.0.16827.20130 will not open pptx's with charts in them (at least bar charts) that have been generated with PHPPresentation. |
+1 same issue here on both Mac & Windows versions of PowerPoint with newly generated powerpoints and powerpoints > 1 year old, all with charts as @WFarmerEthisphere mentioned. Though mine won't even open now after attempting to repair it and Powerpoint says Powerpoint can't read the file. |
Here is a simple script to reproduce the issue: <?php
require_once 'vendor/autoload.php';
use PhpOffice\PhpPresentation\PhpPresentation;
use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Shape\Chart\Type\Bar;
use PhpOffice\PhpPresentation\Shape\Chart\Series;
use PhpOffice\PhpPresentation\Shape\Chart\Title;
// Create a new presentation
$presentation = new PhpPresentation();
// Remove the default slide
$presentation->removeSlideByIndex(0);
// Create a new slide
$slide = $presentation->createSlide();
// Chart data
$seriesData = [
'Category 1' => 1,
'Category 2' => 4,
'Category 3' => 3,
'Category 4' => 2
];
// Create a bar chart
$barChart = new Bar();
$series = new Series('Sample Series', $seriesData);
$series->getFont()->setBold(true);
$barChart->addSeries($series);
// Add chart to slide
$shape = $slide->createChartShape();
$shape->setName('Simple Bar Chart')
->setResizeProportional(false)
->setWidth(600)
->setHeight(400)
->setOffsetX(100)
->setOffsetY(100);
$shape->getTitle()->setText('Basic Bar Chart');
$shape->getPlotArea()->setType($barChart);
// Save the presentation
$oWriterPPTX = IOFactory::createWriter($presentation, 'PowerPoint2007');
$oWriterPPTX->save("SimpleBarChartPresentation.pptx");
echo "Presentation created successfully!\n"; Run this locally, open SimpleBarChartPresentation in a MS Office version > 2309 and you'll see the error. I haven't found exactly where in the BarChart the error persists, sadly. I do know if you comment out the bar chart, the presentation opens with a blank slide and no repairs needed. |
Adding two things that may help with troubleshooting: Opening a presentation in LibreOffice and saving it back to a .pptx makes at least my broken presentations work again in PowerPoint... However, opening the Powerpoint in Apple Keynote, the graphs are missing (although Keynote doesn't report it as broken). Although I don't know if that ever worked before... |
looks like the axis have the wrong i added the following 2 lines to the script provided by @WFarmerEthisphere:
needs confirmation if it works for all chart types or just the bar chart!!! |
Nice find @Scheissy! Confirming this works for bar, line and scatter. |
Just confirmed on my end that @Scheissy's fix works. Thanks! |
@Scheissy 's fix worked for me as well, thank you very much! |
PR created to fix this here: |
Thanks for the solution. It fixed the issue. I was having issue with doughnut chart too. I put these lines of code, and it works for doughnut chart too. So, this solution is working for line, area, bar and doughnut. |
@Scheissy Nice shoot. My users app reported this bug last weekend, thanks for the solution!!!! |
@Scheissy Wonderfull , works for me and solve my problem |
With update version 2309 (Build 16827.20056 Click-to-Run) of Microsoft Office 365, any presentation that includes a chart object will show up as corrupted. In some cases, any page containing a chart will be replaced with a blank slide. In other cases, the presentation will fail to open completely.
A coworker with an earlier version, 2307 (Build 16626.20170 Click-to-Run), reported that the presentations worked just fine, so I tried rolling back. When I did, the presentations opened fine for me as well, with all slides and charts intact.
Rolling back and pausing Microsoft Office updates may work as a temporary internal short term fix, but presentations made with PHPPresentation need to be compatible with the latest and future versions of Microsoft Office.
MySandbox.pptx
I have created and attached a sample presentation that demonstrates the problem and contains no proprietary information:
The text was updated successfully, but these errors were encountered: