pub enum ReferenceType {
Cell {
sheet: Option<String>,
row: u32,
col: u32,
row_abs: bool,
col_abs: bool,
},
Range {
sheet: Option<String>,
start_row: Option<u32>,
start_col: Option<u32>,
end_row: Option<u32>,
end_col: Option<u32>,
start_row_abs: bool,
start_col_abs: bool,
end_row_abs: bool,
end_col_abs: bool,
},
Cell3D {
sheet_first: String,
sheet_last: String,
row: u32,
col: u32,
row_abs: bool,
col_abs: bool,
},
Range3D {
sheet_first: String,
sheet_last: String,
start_row: Option<u32>,
start_col: Option<u32>,
end_row: Option<u32>,
end_col: Option<u32>,
start_row_abs: bool,
start_col_abs: bool,
end_row_abs: bool,
end_col_abs: bool,
},
External(ExternalReference),
Table(TableReference),
NamedRange(String),
}Expand description
A reference to something outside the cell.
Variants§
Cell
Range
Fields
Cell3D
3D cell reference (Sheet1:Sheet3!A1).
Excel evaluates aggregating functions across each sheet between
sheet_first and sheet_last (inclusive) at the same cell address.
Range3D
3D range reference (Sheet1:Sheet3!A1:B2).
Fields
External(ExternalReference)
Table(TableReference)
NamedRange(String)
Implementations§
Source§impl ReferenceType
impl ReferenceType
Sourcepub fn cell(sheet: Option<String>, row: u32, col: u32) -> Self
pub fn cell(sheet: Option<String>, row: u32, col: u32) -> Self
Build a cell reference with relative anchors.
Sourcepub fn cell_with_abs(
sheet: Option<String>,
row: u32,
col: u32,
row_abs: bool,
col_abs: bool,
) -> Self
pub fn cell_with_abs( sheet: Option<String>, row: u32, col: u32, row_abs: bool, col_abs: bool, ) -> Self
Build a cell reference with explicit anchors.
Sourcepub fn range(
sheet: Option<String>,
start_row: Option<u32>,
start_col: Option<u32>,
end_row: Option<u32>,
end_col: Option<u32>,
) -> Self
pub fn range( sheet: Option<String>, start_row: Option<u32>, start_col: Option<u32>, end_row: Option<u32>, end_col: Option<u32>, ) -> Self
Build a range reference with relative anchors.
Sourcepub fn range_with_abs(
sheet: Option<String>,
start_row: Option<u32>,
start_col: Option<u32>,
end_row: Option<u32>,
end_col: Option<u32>,
start_row_abs: bool,
start_col_abs: bool,
end_row_abs: bool,
end_col_abs: bool,
) -> Self
pub fn range_with_abs( sheet: Option<String>, start_row: Option<u32>, start_col: Option<u32>, end_row: Option<u32>, end_col: Option<u32>, start_row_abs: bool, start_col_abs: bool, end_row_abs: bool, end_col_abs: bool, ) -> Self
Build a range reference with explicit anchors.
Sourcepub fn from_string(reference: &str) -> Result<Self, ParsingError>
pub fn from_string(reference: &str) -> Result<Self, ParsingError>
Create a reference from a string. Can be A1, A:A, A1:B2, Table1[Column], etc.
Sourcepub fn from_string_with_dialect(
reference: &str,
dialect: FormulaDialect,
) -> Result<Self, ParsingError>
pub fn from_string_with_dialect( reference: &str, dialect: FormulaDialect, ) -> Result<Self, ParsingError>
Create a reference from a string using the specified formula dialect.
Sourcepub fn parse_sheet_ref(
reference: &str,
) -> Result<SheetRef<'static>, ParsingError>
pub fn parse_sheet_ref( reference: &str, ) -> Result<SheetRef<'static>, ParsingError>
Parse a grid reference into a shared SheetRef, preserving $ anchors.
Only cell and range references are supported. Table and named ranges return an error.
Sourcepub fn parse_sheet_ref_with_dialect(
reference: &str,
dialect: FormulaDialect,
) -> Result<SheetRef<'static>, ParsingError>
pub fn parse_sheet_ref_with_dialect( reference: &str, dialect: FormulaDialect, ) -> Result<SheetRef<'static>, ParsingError>
Parse a grid reference into a shared SheetRef using the specified dialect.
Sourcepub fn to_sheet_ref_lossy(&self) -> Option<SheetRef<'_>>
pub fn to_sheet_ref_lossy(&self) -> Option<SheetRef<'_>>
Lossy conversion from parsed ReferenceType into SheetRef. External, table, and named ranges are discarded; anchors are preserved.
Source§impl ReferenceType
impl ReferenceType
Trait Implementations§
Source§impl Clone for ReferenceType
impl Clone for ReferenceType
Source§fn clone(&self) -> ReferenceType
fn clone(&self) -> ReferenceType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more