detect_file_format方法

detect_file_format(stream)

检测并返回有关存储在流中的 excel 格式的信息。

返回

包含检测到的信息的 FileFormatInfo 对象。

def detect_file_format(self, stream):
    ...
范围类型描述
streamio.RawIOBase

detect_file_format(file_path)

检测并返回有关存储在文件中的 excel 格式的信息。

返回

包含检测到的信息的 FileFormatInfo 对象。

def detect_file_format(self, file_path):
    ...
范围类型描述
file_pathstr文件路径。

detect_file_format(stream, password)

检测并返回有关存储在流中的 excel 格式的信息。

返回

包含检测到的信息的 FileFormatInfo 对象。

def detect_file_format(self, stream, password):
    ...
范围类型描述
streamio.RawIOBase
passwordstr加密 ooxml 文件的密码。

detect_file_format(file_path, password)

检测并返回有关存储在文件中的 excel 格式的信息。

返回

包含检测到的信息的 FileFormatInfo 对象。

def detect_file_format(self, file_path, password):
    ...
范围类型描述
file_pathstr文件路径。
passwordstr加密 ooxml 文件的密码。

也可以看看