pub enum CellValue {
Number(f64),
Text(String),
Boolean(bool),
Error(ExcelError),
Formula(String),
Blank,
}Expand description
Everything a grid cell can hold.
Formula carries the formula text verbatim as written (typically
with its leading =) — sheet-core does not evaluate formulas. The
dependency graph over formula text lives in
crate::DependencyGraph.
Variants§
Number(f64)
A floating-point number — the universal numeric storage of every mainstream spreadsheet (dates included: they are numbers plus style).
Text(String)
Text. Empty text is distinct from CellValue::Blank: the cell
exists and holds a zero-length string.
Boolean(bool)
A boolean.
Error(ExcelError)
A formula error result.
Formula(String)
Formula text, stored verbatim (usually including the leading =).
A cell whose value is a formula has no cached result in this model;
engines that cache results layer that on top.
Blank
The explicit blank: the cell exists (and may carry a style) but holds no value. Absence from the sheet map is the implicit blank.
Implementations§
Source§impl CellValue
impl CellValue
Sourcepub const fn error(e: ExcelError) -> Self
pub const fn error(e: ExcelError) -> Self
Convenience constructor: CellValue::Error(e).
Sourcepub fn formula(text: impl Into<String>) -> Self
pub fn formula(text: impl Into<String>) -> Self
Convenience constructor: CellValue::Formula(text).
Sourcepub const fn is_formula(&self) -> bool
pub const fn is_formula(&self) -> bool
true when this value is a CellValue::Formula.