Excel's xlsx files are generally zip archives. But Excel has a very specific and strict ZIP64 implementation.
Connected Apache POI issue: [https://bz.apache.org/bugzilla/show_bug.cgi?id=57342
]My blog post with all the details: https://rzymek.github.io/post/excel-zip64/
My observations on Excel requirements:
- If file size is > 4gb, then zip spec version 4.5 must be set in Local Header File
- In streaming creation the zero file sizes must be in 32 field, not in LHF's ZIP64 extra field data.
- ZIP64 extra field in Central Directory must not include relativeHeaderOffset. Only size or size and compressed size
- ZIP64 Central Directory is not supported
I did verify these in a repository at https://github.com/rzymek/commons-compress/pull/1/files. This is just a playground where I've tested the changes to verify that Excel opens the generated file.
Test project: https://github.com/rzymek/xlsx-compress64-test