Office
The office document family identifies office document formats from the leading bytes of a file.
Supported formats
detect
Identifies the office document format of data from its leading bytes. Returns
null in Node.js and None in Python when the format is not recognized.
For the ZIP-based formats, data must contain the local file headers up to the
first entry that identifies the format. Office applications write that entry
near the start of the file, so the first few kilobytes are usually enough.
Node.js
Python
DetectedFormat
A format identified by detect.
In Python, DetectedFormat is a final class with read-only properties, and the
type of each property is str.
supportedFormats
Returns the identifier of each format that detect can return.