detect_file_format method

detect_file_format(, stream)

Detects and returns the information about a format of an excel stored in a stream.

Returns

A FileFormatInfo object that contains the detected information.


@staticmethod
def detect_file_format(stream):
    ...
ParameterTypeDescription
streamio.RawIOBase

detect_file_format(, file_path)

Detects and returns the information about a format of an excel stored in a file.

Returns

A FileFormatInfo object that contains the detected information.


@staticmethod
def detect_file_format(file_path):
    ...
ParameterTypeDescription
file_pathSystem.StringThe file path.

Remarks

Only supports checking some files with magic signature. If there is no magic signature, we can not precisely detect the file format.

detect_file_format(, stream, password)

Detects and returns the information about a format of an excel stored in a stream.

Returns

A FileFormatInfo object that contains the detected information.


@staticmethod
def detect_file_format(stream, password):
    ...
ParameterTypeDescription
streamio.RawIOBase
passwordSystem.StringThe password for encrypted ooxml files.

detect_file_format(, file_path, password)

Detects and returns the information about a format of an excel stored in a file.

Returns

A FileFormatInfo object that contains the detected information.


@staticmethod
def detect_file_format(file_path, password):
    ...
ParameterTypeDescription
file_pathSystem.StringThe file path.
passwordSystem.StringThe password for encrypted ooxml files.

Remarks

Only supports checking some files with magic signature. If there is no magic signature, we can not precisely detect the file format.

See Also