File with LF instead of CRLF won't parse
Hi, I have a file I need to process daily with a creator being "Apache POI". The file doesn't parse and throws an error "XML-entry not found in _rels/.rels".
The file parses when I open it and save it in Excel. When I unzip the two XLSX files and compare the directories, it is apparent that the difference is - different line endings, for all files in the archive, including _rels/.rels and all worksheets.
I understand this is technically not a bug, but I would really appreciate a hint about what to change to allow UNIX line endings in files.
Thank you!
what output
print_r( $xlsx->getPackage() );
?
Hi,
and thanks a lot!
I'm not sure if it prints out the whole data, but it looks like this:
Array ( [filename] => /tmp/phpahxL7a [mtime] => 1678131422 [size] => 44915 [comment] => [entries] => Array ( [0] => Array ( [data] => \xcdTIn\x021\x10\xfc\xca\xc8\xd7hl\xe0\x10E\x11\x03\x87,\xc7\x04)\xe4\x01\x8e\xdd\xc3Xx\x93\xdb\x10\xf8}\xda\x03\x1cB\x88D\x84\x90r\xf2R\xd5U\xd5-\xcb\xe3\xe9\xc6\xd9j\r\tM\xf0\r\x1b\xf2\x01\xab\xc0\xab\xa0\x8d_4\xec}\xfe\\xdf\xb1 @.\x9d\x8c\xe7\xdb\bXQ\xad\xc7\x86u9\xc7{!Pu\xe0$\xf2\x10\xc1\x13\xd2\x86\xe4d\xa6cZ\x88(\xd5R.@\x8c\x06\x83[\xa1\x82\xcf\xe0s\x9d\x8b\x06\x9b\x8c\x1f\xa1\x95+\x9b\xab\x87\xdd}\x91n\x98\x8c\xd1\x1a%3\xc5\x12k\xaf\x8fD\xeb\xbd @.\x96c'\x13\xe8\xb7\x9c\xe85\xfd\x0c\xb1\xb1\xe2\x1b\xe1\x8a9\xf2\xd6\x9e\x98B\t\xd0#\xd7\x9c, referer: https://test.local https://test.local/
Tahnks a lot!
Josef
On 6 Mar 2023, at 19:58, Sergey Shuchkin @.***> wrote:
what output
print_r( $xlsx->getPackage() ); ?
— Reply to this email directly, view it on GitHub https://github.com/shuchkin/simplexlsx/issues/144#issuecomment-1456773304, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDMBIUDEV2EF45EUKHUR6TW2YXWXANCNFSM6AAAAAAVROQ22Y. You are receiving this because you authored the thread.
send to [email protected]
u have bad generated zip
try comment 603-605

- don't use composer to update, to prevent rewrite your hacked version
Thanks, that worked! So I believe the file has a wrong "compressed size" flag, probably caused by those missing or extra CR characters. Thanks again!
I hit the same issue - XML-entry not found _rels/.rels error, which goes away after commenting lines 603-606.
The problem is the file I'm working with is generated by one of the Yandex services.
Could you enunciate what is wrong with the file, so I can point it out to their team as a bug? (I'm afraid "bad generated zip" will not be enough for them).
Будет здорово, если вы еще и переведете это на русский.
Try other xlsx parser
I hit the same issue -
XML-entry not found _rels/.relserror, which goes away after commenting lines 603-606.The problem is the file I'm working with is generated by one of the Yandex services.
Could you enunciate what is wrong with the file, so I can point it out to their team as a bug? (I'm afraid "bad generated zip" will not be enough for them).
Будет здорово, если вы еще и переведете это на русский.
Try other php parser