Skip to main content

Sheet

Struct Sheet 

Source
pub struct Sheet {
    pub name: String,
    pub cells: BTreeMap<(u32, u32), Cell>,
    pub columns: Vec<Column>,
    pub rows: BTreeMap<u32, RowSettings>,
    pub looks: Vec<(String, u32)>,
    pub visibility: Visibility,
    pub gridlines: bool,
    pub active_cell: (u32, u32),
    pub shared_formulas: u32,
    pub sentences: BTreeMap<(u32, u32), u32>,
}
Expand description

One sheet: its cells by (row, column), both 1-based.

Fields§

§name: String§cells: BTreeMap<(u32, u32), Cell>§columns: Vec<Column>§rows: BTreeMap<u32, RowSettings>

The rows with settings of their own, by number (KERNEL.22), printed as the view record’s row rows; empty for a sheet the writer built.

§looks: Vec<(String, u32)>

The look map (KERNEL.22; Alonzo/SPEC.md decision 19): a value as a cell row spells it, and the format a cell holding that value draws with in place of its own, in the order declared; printed as the view record’s look rows.

§visibility: Visibility

Whether the sheet has a tab (KERNEL.22): the reader’s three words. Every sheet the writer builds is visible; an engine’s twins are hidden.

§gridlines: bool§active_cell: (u32, u32)

The selected cell when the sheet opens, (row, column).

§shared_formulas: u32

How many shared formulas the sheet holds; the next one’s index.

§sentences: BTreeMap<(u32, u32), u32>

The row of the sentence that wrote each cell, by (row, column): the program line, which is the row of the Frazaro sheet that holds the sentence (KERNEL.4, the view record). Filled by the build’s walker; empty for a sheet nothing wrote by sentence.

Implementations§

Source§

impl Sheet

Source

pub fn new(name: &str) -> Sheet

Source

pub fn wrote(&mut self, range: A1Range, row_of_sentence: u32)

Record that the sentence on program row row_of_sentence wrote every cell of range, after the cells are set.

Source

pub fn set(&mut self, row: u32, col: u32, cell: Cell)

Source

pub fn set_formula_dynamic(&mut self, range: A1Range, text: &str, style: u32)

A formula’s text (without its =) into every cell of a range: one plain formula for one cell, a shared formula for more. A formula whose function can return an array, into every cell of a range as Excel stores a Formula2 entry of it: a dynamic-array formula per cell (a dynamic-array formula cannot be shared), its references moved by the cell’s distance from the top-left one, as Excel moves them when a formula is filled (the mover is crate::refers::shift_a1_references since PORT.8, slice 8b).

Source

pub fn set_formula(&mut self, range: A1Range, text: &str, style: u32)

Source

pub fn extent(&self) -> Option<((u32, u32), (u32, u32))>

The used range as ((first row, first column), (last row, last column)), or None for a sheet with no cell.

Trait Implementations§

Source§

impl Clone for Sheet

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Sheet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Sheet

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Sheet

Auto Trait Implementations§

§

impl Freeze for Sheet

§

impl RefUnwindSafe for Sheet

§

impl Send for Sheet

§

impl Sync for Sheet

§

impl Unpin for Sheet

§

impl UnsafeUnpin for Sheet

§

impl UnwindSafe for Sheet

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.