h2non / filetype.py

Small, dependency-free, fast Python package to infer binary file types checking the magic numbers signature
https://h2non.github.io/filetype.py
MIT License
647 stars 110 forks source link

XLS Support #66

Open mishu- opened 4 years ago

mishu- commented 4 years ago

Is it doable to also check for XLS?

h2non commented 4 years ago

Yes, it is. It was already implemented in the Go port of this package: https://github.com/h2non/filetype#documents

PR would be very welcome!

Agent-Hellboy commented 3 years ago

Hi @h2non The magic number of all the office documents are same how will I distinguish between doc, xls, and ppt file. I have also checked the https://github.com/file/file but that was tough for me to understand.``

Word Document | .doc | D0 CF 11 E0 A1 B1 1A E1
Excel Document | .xls | D0 CF 11 E0 A1 B1 1A E1
PowerPoint Document | .ppt | D0 CF 11 E0 A1 B1 1A E1
Visio Document | .vsd | D0 CF 11 E0 A1 B1 1A E1