Skip to content

document: scan all ZIP local headers for OOXML type - #162

Open
team-humaki wants to merge 1 commit into
h2non:masterfrom
team-humaki:xlsx-scan-zip-headers
Open

team-humaki wants to merge 1 commit into
h2non:masterfrom
team-humaki:xlsx-scan-zip-headers

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #153

msooxml assumed a ZIP local-file order (first name is [Content_Types].xml / _rels, type from the 3rd/4th name). That fails for XLSX from excelize, Excel, and Google Sheets, which put xl/ later in the archive.

Walk every local file header in the inspected buffer and classify from word/, xl/, or ppt/ prefixes. Plain ZIP files still do not match.

XLSX/DOCX/PPTX writers do not share a ZIP entry order, so looking
only at the 1st/3rd/4th local name misses files such as excelize
spreadsheets. Walk every local header in the buffer instead.

Fixes h2non#153
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure to detect XLSX

1 participant