CellMut
概述
CellMut 是 Aspose.Cells 为 Rust 提供的 FOSS 中的结构体。
表示单个工作表单元格,并提供值、公式和样式操作。
此结构体为 Rust 程序中的 CellMut 对象声明了 88 个方法。可用的方法包括:apply_bold、apply_border_color、apply_border_line_style、apply_fill、apply_fill_color、apply_font、apply_horizontal_alignment、apply_italic、apply_number_format、apply_text_wrap、apply_vertical_alignment、bool_value,以及另外 76 个方法。安装 Aspose.Cells 为 Rust 提供的 FOSS 包后,公共成员对任何 Rust 应用程序均可访问。
方法
| 签名 | 描述 |
|---|---|
name() → String | 获取关联的值。 |
get_name() → String | 获取关联的值。 |
row() → u32 | 获取关联的值。 |
get_row() → u32 | 获取关联的值。 |
column() → u32 | 获取关联的值。 |
get_column() → u32 | 获取关联的值。 |
value() → Option<&CellValue> | 获取逻辑单元格值。 |
get_value() → Option<&CellValue> | 获取逻辑单元格的值。 |
value_type() → CellValueType | 获取当前逻辑单元格值类型。 |
get_type() → CellValueType | 获取当前逻辑单元格值的类型。 |
int_value() → Option<i32> | 获取关联的值。 |
get_int_value() → Option<i32> | 获取关联的值。 |
long_value() → Option<i64> | 获取关联的值。 |
get_long_value() → Option<i64> | 获取关联的值。 |
double_value() → Option<f64> | 获取关联的值。 |
get_double_value() → Option<f64> | 获取关联的值。 |
bool_value() → Option<bool> | 获取关联的值。 |
get_bool_value() → Option<bool> | 获取关联的值。 |
date_time_value() → Option<DateTime<Utc>> | 获取关联的值。 |
get_date_time_value() → Option<DateTime<Utc>> | 获取关联的值。 |
string_value() → Option<&str> | 获取单元格值的稳定字符串表示形式,而不应用基于样式的显示格式化。 |
get_string_value() → Option<&str> | 获取单元格值的稳定字符串表示形式,而不应用基于样式的显示格式化。 |
raw_string_value() → String | 获取关联的值。 |
get_raw_string_value() → String | 获取关联的值。 |
display_string_value() → String | 获取根据单元格值、样式和工作簿区域设置生成的显示文本。 |
get_display_string_value() → String | 获取根据单元格值、样式和工作簿区域设置生成的显示文本。 |
formatted_string_value() → String | 获取关联的值。 |
get_formatted_string_value() → String | 获取关联的值。 |
style() → Style | 获取关联的值。 |
get_style() → Style | 获取关联的值。 |
get_style_with_borders(_check_borders: bool) → Style | 获取关联的值。 |
border() → Option<&Border> | 获取关联的值。 |
get_border() → Option<&Border> | 获取关联的值。 |
formula_cached_value() → Option<&CellValue> | 获取关联的值。 |
get_formula_cached_value() → Option<&CellValue> | 获取关联的值。 |
put_value(value: CellValue) → Result<(), CellsError> | 设置值。 |
put_value_object(value: impl Into<CellObjectValue>) → Result<(), CellsError> | 设置值对象。 |
put_number(value: f64) → Result<(), CellsError> | 设置数字。 |
put_bool(value: bool) → Result<(), CellsError> | 设置 bool。 |
put_string(value: impl Into<String>) → Result<(), CellsError> | 设置字符串。 |
put_value_string(value: impl Into<String>) → Result<(), CellsError> | 设置值字符串。 |
put_value_i32(value: i32) → Result<(), CellsError> | 设置 i32 值。 |
put_value_u8(value: u8) → Result<(), CellsError> | 设置值 u8。 |
put_value_i16(value: i16) → Result<(), CellsError> | 设置 i16 的值。 |
put_value_i64(value: i64) → Result<(), CellsError> | 设置 i64 值。 |
put_value_f32(value: f32) → Result<(), CellsError> | 设置值 f32。 |
put_value_f64(value: f64) → Result<(), CellsError> | 设置值 f64。 |
put_value_decimal(value: f64) → Result<(), CellsError> | 设置十进制值。 |
put_value_bool(value: bool) → Result<(), CellsError> | 设置值 bool。 |
put_value_char(value: char) → Result<(), CellsError> | 设置值字符。 |
put_date_time(value: DateTime<Utc>) → Result<(), CellsError> | 设置日期时间。 |
put_value_date_time(value: DateTime<Utc>) → Result<(), CellsError> | 设置值的日期时间。 |
put_datetime(value: DateTime<Utc>) → Result<(), CellsError> | 设置 datetime。 |
put_formula(value: impl Into<String>) → Result<(), CellsError> | 设置公式。 |
put_value_string_converted(value: impl Into<String>, is_converted: bool) → Result<(), CellsError> | 设置已转换的值字符串。 |
put_value_string_converted_with_style(value: impl Into<String>, is_converted: bool, _set_style: bool) → Result<(), CellsError> | 设置使用样式转换的值字符串。 |
put_formula_with_cached_value(formula: impl Into<String>, cached_value: CellValue) → Result<(), CellsError> | 设置具有缓存值的公式。 |
set_style(style: CellStyle) → Result<(), CellsError> | 设置关联的值。 |
set_style_with_explicit_flag(style: CellStyle, _explicit_flag: bool) → Result<(), CellsError> | 设置关联的值。 |
set_style_with_flag(style: CellStyle, flag: StyleFlag) → Result<(), CellsError> | 设置关联的值。 |
set_border(border: Border) → Result<(), CellsError> | 设置关联的值。 |
apply_border_line_style(value: BorderLineStyle) → Result<(), CellsError> | 应用边框线样式。 |
apply_border_color(value: impl Into<String>) → Result<(), CellsError> | 应用边框颜色。 |
clear_border() → Result<(), CellsError> | 清除边框。 |
clear_style() → Result<(), CellsError> | 清除样式。 |
reset_style() → Result<(), CellsError> | 将单元格样式重置为工作簿的默认样式。 |
apply_font(font: Font) → Result<(), CellsError> | 应用字体。 |
apply_fill(fill: Fill) → Result<(), CellsError> | 应用填充。 |
apply_fill_color(value: impl Into<String>) → Result<(), CellsError> | 应用填充颜色。 |
clear_fill_color() → Result<(), CellsError> | 清除填充颜色。 |
clear_fill() → Result<(), CellsError> | 清除填充。 |
apply_bold(value: bool) → Result<(), CellsError> | 应用粗体。 |
apply_italic(value: bool) → Result<(), CellsError> | 应用斜体。 |
clear_bold() → Result<(), CellsError> | 清除粗体。 |
clear_italic() → Result<(), CellsError> | 清除斜体。 |
clear_font() → Result<(), CellsError> | 清除字体。 |
apply_number_format(value: impl Into<String>) → Result<(), CellsError> | 应用数字格式。 |
clear_number_format() → Result<(), CellsError> | 清除数字格式。 |
apply_horizontal_alignment(value: HorizontalAlignment) → Result<(), CellsError> | 应用水平对齐。 |
clear_horizontal_alignment() → Result<(), CellsError> | 清除水平对齐。 |
apply_vertical_alignment(value: VerticalAlignment) → Result<(), CellsError> | 应用垂直对齐。 |
clear_vertical_alignment() → Result<(), CellsError> | 清除垂直对齐。 |
clear_alignment() → Result<(), CellsError> | 清除对齐。 |
apply_text_wrap(value: bool) → Result<(), CellsError> | 应用文本换行。 |
clear_text_wrap() → Result<(), CellsError> | 清除文本换行。 |
update_style(updater: impl FnOnce(&mut CellStyle)) → Result<(), CellsError> | 使用提供的回调函数就地更新单元格样式。 |
set_value(value: CellValue) → Result<(), CellsError> | 设置逻辑单元格值。 |
clear_value() → Result<(), CellsError> | 清除值。 |