Pull request and a question #2108
jabouillei
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I submitted a fix for #1449 / Removing rows or columns that include range edges back in 14.1 and the ticket was eventually closed with no feedback. I upgraded to 17.1 last week in hopes of finding conditional format codes (which it turns out were already present in 14.1; they just don't handle quotes properly) and brought the old patch up to date and have submitted it as pull request #2096 . I'm afraid that might go another year with no one noticing, so I thought I'd make a note here.
Unfortunately, I'll be going back to 14.1. I'm getting "unreadable content" errors regarding complex Excel files from our client when I use 17.1. (The client sends us an Excel file and we update it using PHPSpreadsheet and send it back.) I can't release our client's Excel file as a sample and I haven't been able to create a simple spreadsheet that exhibits the error, so I won't file a bug report. I put some hours into debugging, but it would take many more hours than I have available to spend on it. Sorry. Perhaps someone reading this will understand - With 14.1, only clean definedNames ended up in the workbook.xml; with 17.1, ranges that PHPSpreadsheet didn't understand become "#REF!" or something involving "#REF!" and Excel reports that there is unreadable content. Excel fixes it, but it isn't presentable to clients.
Example: Excel produces a file that includes
<definedName name="ae">'[1]DataPg2-Universe'!$A$13</definedName>
We process the file and use PHP Spreadsheet to output it back into Excel and (using 17.1) it comes out with
<definedName name="ae">#REF!</definedName>
I reverted to 14.1 and the resulting workbook.xml was much smaller. All of the strange definedNames were removed. I have no idea why Excel put them in there in the first place. This smells to me like a problem with Excel including garbage in a file and 17.1 converting it to worse garbage while 14.1 stripped it.
I tried simply skipping any defined names that include #REF! in Writer/Xlsx/DefinedNames.php, but that wasn't enough to make Excel happy.
Beta Was this translation helpful? Give feedback.
All reactions