detect_file_format方法

detect_file_format(stream)

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

返回

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

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

detect_file_format(file_path)

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

返回

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

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

detect_file_format(stream, password)

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

返回

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

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

detect_file_format(file_path, password)

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

返回

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

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

也可以看看