pub enum Value {
Empty,
Number(f64),
Text(String),
Bool(bool),
Date(f64),
Error(CellError),
}Expand description
A cell value with its type.
Date holds an OLE Automation date, as Visio and Excel’s 1900 date system use it: days since
1899-12-30, the fraction is the time of day (values are taken as linear, also below zero).
Values from 0 to below 1 are a time of day without a date. The XLSX reader converts the
1904 date system and Excel’s fake 1900-02-29 (see xlsx).
Variants§
Empty
no value (an empty cell, a formula without a cached result)
Number(f64)
a number
Text(String)
a text
Bool(bool)
TRUE or FALSE
Date(f64)
a date and time as an OLE Automation date (days since 1899-12-30)
Error(CellError)
an error value of a cell (#N/A, #DIV/0! …)
Implementations§
Source§impl Value
impl Value
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
The display form: numbers as the shortest text that reads back (base::f64_format,
-0 as 0), dates as ISO 8601 (2026-11-23, 2026-11-23 14:05:00, a time of day alone
as 14:05:00, milliseconds only when there are some: 14:05:00.250), booleans as
TRUE / FALSE, errors as Excel writes them (#N/A), Empty as “”.