-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
File containing a chart can not be opened by Excel 2003/2013/2019 #1337
Comments
Look at this: #1294 it seems to be the same |
It seems to be the same effect, yes, although I suspect #1294 to have found an issue in the reader while this is probably just an issue with the examples. If you replace L95 with 'gap' (instead of 0), the exported excel file is valid. This goes back to this commit 144a0ca#diff-0fa257b790aee274c5c82d3156288e94 I assume that the reader does not correctly set this value in ticket #1294 and that this might cause problems when writing the file again. Not sure if I should close this ticket and open a new one for the adjustment of the examples or if I should just change this one's title … ? |
@xrm, thanks for your comment. You're save a lot of my time in addition i would to say one important thing. I faced this issue after migrating from PHPExcel 1.8 and this issue is coused by change in
with PhpSpreadsheet previous value need to be increased by 1. |
You have saved me a lot of time. But why is this issue closed? |
So... I can create a PR for Examples for charts if it's needed. Solution is here:
Just replace small part of code |
Well, the same error occurs in other situations. I wanted to import an existing excel sheet that already has an Chart and just change data on another sheet. But like this it's impossible. But at least with your workaround I can get it working. But if that is the correct way to do this, we should at least adapt the example files... |
Wow, thank you so much for the ticket. I wasted 8 hours yesterday trying to figure out if this was an Excel for MacOS issue, Office O365 issue or just my stupid issue. Went to bed at midnight and this morning found this ticket and within 5 seconds solved the problem. Thank you. |
Yes, and still nobody is going to work on this problem. PHPSpreadsheet is pretty much dead. Just a question of time until this issue is closed by the robot... |
Why do you say it is dead. Version 1.11.0 was released March 2, 2020. I think it is a great library. I have only submitted a Pull Request once, about 3 years ago for dc.js. Maybe if I find sometime I will try to remember how to do it again. I would love to contribute. |
Because this is not a new issue. It exists for a while. I have lost also many hours with this errors. |
displayBlanksAs Repace 0 to gap
|
@parthkharecha : Yes, it's written in comment 578692963 (the second in this thread), too. This ticket is just open in order to track if the examples were adjusted (Edit: or if they should be, at all). |
This solve for me, with sample 33_Chart_create_pie_custom_colors.php only change line 93 and 165 from 0 to 'gap' in displayBlanksAs; with xlsx like the base example. |
@cwolcott I just saw that you also commited a PR back then - thank you :-) For those that are wondering what the current state of this issue is, please look at PR #1448 I will close this ticket now, since the PR is underway. |
Thank you all for your patience. The PR was merged. And the project is not dead. It is going at a slow pace, but it still is alive. The best thing you can do to help the project is to have constructive discussion around issues like you did here, and then create a well crafted PR like @cwolcott did. |
Thank you for this - changing 0 for 'gap' fixed my problem. |
I have tried putting the 'gap' but it does not work for me. Can anyone help me to sort this out? I am using line and area charts, if I comment the area chart code it works fine but throwing error of Repaired Records: Drawing from /xl/drawings/drawing1.xml part (Drawing shape) phpspreadsheet when I use the area chart code.
|
This is:
What is the expected behavior?
MS Office Excel should open an exported xlsx without any issues.
What is the current behavior?
Excel 2003, Excel 2013 and Excel 2019 (probably others, too) complain that the file is corrupted and offer to try to repair the sheet. If allowed to do so, all charts will be removed.
What are the steps to reproduce?
Run 33_Chart_create_stock.php (or probably any other chart example) and open the resulting file in Excel 2013.
Which versions of PhpSpreadsheet and PHP are affected?
PHPSpreadsheet 1.10.1
PHP 7.3.11
Additional comments
Exported files can be opened without any warning as long as they don't contain a chart.
Also, files can be opened with LibreOffice Calc without any issues.
The text was updated successfully, but these errors were encountered: