FileFormatUtil类

FileFormatUtil类

提供用于将文件格式枚举转换为字符串或文件扩展名并返回的实用方法。

FileFormatUtil 类型公开了以下成员:

方法

方法 描述
detect_file_format(stream) 检测并返回有关存储在流中的 excel 格式的信息。
detect_file_format(stream, password) 检测并返回有关存储在流中的 excel 格式的信息。
detect_file_format(file_path) 检测并返回有关存储在文件中的 excel 格式的信息。
detect_file_format(file_path, password) 检测并返回有关存储在文件中的 excel 格式的信息。
verify_password(stream, password) 检测并返回有关存储在流中的 excel 格式的信息。
file_format_to_save_format(format) 将文件格式转换为保存格式。
extension_to_save_format(extension) 将文件扩展名转换为 SaveFormat 值。
is_template_format(extension) 如果扩展名是 .xlt、.xltX、.xltm、.ots,则返回 true。
load_format_to_extension(load_format) 将加载格式枚举值转换为文件扩展名。
load_format_to_save_format(load_format) 如果可能,将 LoadFormat 值转换为 SaveFormat 值。
save_format_to_extension(format) 将保存格式枚举值转换为文件扩展名。
save_format_to_load_format(save_format) 如果可能,将 SaveFormat 值转换为 LoadFormat 值。

也可以看看