pub struct CellContent {
pub value: Value,
pub style: Option<CellStyleRef>,
pub formula: Option<String>,
pub repeat: u32,
pub validation_name: Option<ValidationRef>,
pub span: CellSpan,
pub matrix_span: CellSpan,
pub annotation: Option<Box<Annotation>>,
pub draw_frames: Vec<DrawFrame>,
}
Expand description
A copy of the relevant data for a spreadsheet cell.
Fields§
§value: Value
Cell value.
style: Option<CellStyleRef>
Cell stylename.
formula: Option<String>
Cell formula.
repeat: u32
Cell repeat count.
validation_name: Option<ValidationRef>
Reference to a validation rule.
span: CellSpan
Cellspan.
matrix_span: CellSpan
Matrix span.
annotation: Option<Box<Annotation>>
Annotation
draw_frames: Vec<DrawFrame>
DrawFrames
Implementations§
Source§impl CellContent
impl CellContent
Sourcepub fn set_formula<V: Into<String>>(&mut self, formula: V)
pub fn set_formula<V: Into<String>>(&mut self, formula: V)
Sets the formula.
Sourcepub fn clear_formula(&mut self)
pub fn clear_formula(&mut self)
Resets the formula.
Sourcepub fn style(&self) -> Option<&CellStyleRef>
pub fn style(&self) -> Option<&CellStyleRef>
Returns the cell style.
Sourcepub fn set_style(&mut self, style: &CellStyleRef)
pub fn set_style(&mut self, style: &CellStyleRef)
Sets the cell style.
Sourcepub fn clear_style(&mut self)
pub fn clear_style(&mut self)
Removes the style.
Sourcepub fn set_repeat(&mut self, repeat: u32)
pub fn set_repeat(&mut self, repeat: u32)
Sets the repeat count for the cell. Value must be > 0.
Sourcepub fn get_repeat(&mut self) -> u32
pub fn get_repeat(&mut self) -> u32
Returns the repeat count for the cell.
Sourcepub fn validation(&self) -> Option<&ValidationRef>
pub fn validation(&self) -> Option<&ValidationRef>
Returns the validation name.
Sourcepub fn set_validation(&mut self, validation: &ValidationRef)
pub fn set_validation(&mut self, validation: &ValidationRef)
Sets the validation name.
Sourcepub fn clear_validation(&mut self)
pub fn clear_validation(&mut self)
No validation.
Sourcepub fn set_row_span(&mut self, rows: u32)
pub fn set_row_span(&mut self, rows: u32)
Sets the row span of this cell. Cells below with values will be lost when writing.
Sourcepub fn set_col_span(&mut self, cols: u32)
pub fn set_col_span(&mut self, cols: u32)
Sets the column span of this cell. Cells to the right with values will be lost when writing.
Sourcepub fn set_matrix_row_span(&mut self, rows: u32)
pub fn set_matrix_row_span(&mut self, rows: u32)
Sets the row span of this cell. Cells below with values will be lost when writing.
Sourcepub fn matrix_row_span(&self) -> u32
pub fn matrix_row_span(&self) -> u32
Returns the row span.
Sourcepub fn set_matrix_col_span(&mut self, cols: u32)
pub fn set_matrix_col_span(&mut self, cols: u32)
Sets the column span of this cell. Cells to the right with values will be lost when writing.
Sourcepub fn matrix_col_span(&self) -> u32
pub fn matrix_col_span(&self) -> u32
Returns the col span.
Sourcepub fn set_annotation(&mut self, annotation: Annotation)
pub fn set_annotation(&mut self, annotation: Annotation)
Annotation
Sourcepub fn clear_annotation(&mut self)
pub fn clear_annotation(&mut self)
Annotation
Sourcepub fn annotation(&self) -> Option<&Annotation>
pub fn annotation(&self) -> Option<&Annotation>
Returns the Annotation
Sourcepub fn set_draw_frames(&mut self, draw_frames: Vec<DrawFrame>)
pub fn set_draw_frames(&mut self, draw_frames: Vec<DrawFrame>)
Draw Frames
Sourcepub fn draw_frames(&self) -> &Vec<DrawFrame>
pub fn draw_frames(&self) -> &Vec<DrawFrame>
Draw Frames
Trait Implementations§
Source§impl Clone for CellContent
impl Clone for CellContent
Source§fn clone(&self) -> CellContent
fn clone(&self) -> CellContent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more