NumberFormat

概述

NumberFormat 是 Rust 的 Aspose.Cells FOSS 中的结构体。继承自:Default、Clone、PartialEq。

提供数字格式操作。

此结构体为 Rust 程序中的 NumberFormat 对象声明了 5 个方法。可用的方法包括:create_built_in_formats、get_built_in_format、get_built_in_format_id、is_built_in_format、resolve_format_code。在安装 Aspose.Cells FOSS for Rust 包后,公共成员可被任何 Rust 应用程序访问。

方法

签名描述
get_built_in_format(format_id: i32) → String获取关联的值。
is_built_in_format(format_code: String) → bool返回是否为内置格式。
get_built_in_format_id(format_code: String) → Option<i32>获取关联的值。
resolve_format_code(number: i32, custom: String) → String根据内置格式 ID 以及可选的自定义代码解析出实际的格式代码。
create_built_in_formats() → HashMap<i32, String>创建一个将内置 Excel 数字格式 ID 映射到格式代码的映射表。

另请参阅

 中文