Struct spreadsheet_ods::Sheet[][src]

pub struct Sheet { /* fields omitted */ }

One sheet of the spreadsheet.

Contains the data and the style-references. The can also be styles on the whole sheet, columns and rows. The more complicated grouping tags are not covered.

Implementations

impl Sheet[src]

pub fn new() -> Self[src]

New, empty

pub fn new_with_name<S: Into<String>>(name: S) -> Self[src]

New, empty, but with a name.

pub fn clone_no_data(&self) -> Self[src]

Copy all the attributes but not the actual data.

pub fn set_name<V: Into<String>>(&mut self, name: V)[src]

Sheet name.

pub fn name(&self) -> &String[src]

Sheet name.

pub fn set_style(&mut self, style: &TableStyleRef)[src]

Sets the table-style

pub fn style(&self) -> Option<&String>[src]

Returns the table-style.

pub fn set_colstyle(&mut self, col: ucell, style: &ColStyleRef)[src]

Column style.

pub fn clear_colstyle(&mut self, col: ucell)[src]

Remove the style.

pub fn colstyle(&self, col: ucell) -> Option<&String>[src]

Returns the column style.

pub fn set_col_cellstyle(&mut self, col: ucell, style: &CellStyleRef)[src]

Default cell style for this column.

pub fn clear_col_cellstyle(&mut self, col: ucell)[src]

Remove the style.

pub fn col_cellstyle(&self, col: ucell) -> Option<&String>[src]

Returns the default cell style for this column.

pub fn set_col_visible(&mut self, col: ucell, visible: Visibility)[src]

Visibility of the column

pub fn col_visible(&self, col: ucell) -> Visibility[src]

Returns the default cell style for this column.

pub fn set_col_width(
    &mut self,
    workbook: &mut WorkBook,
    col: ucell,
    width: Length
)
[src]

Creates a col style and sets the col width.

pub fn set_rowstyle(&mut self, col: ucell, style: &RowStyleRef)[src]

Row style.

pub fn clear_rowstyle(&mut self, col: ucell)[src]

Remove the style.

pub fn rowstyle(&self, col: ucell) -> Option<&String>[src]

Returns the row style.

pub fn set_row_cellstyle(&mut self, col: ucell, style: &CellStyleRef)[src]

Default cell style for this row.

pub fn clear_row_cellstyle(&mut self, col: ucell)[src]

Remove the style.

pub fn row_cellstyle(&self, col: ucell) -> Option<&String>[src]

Returns the default cell style for this row.

pub fn set_row_visible(&mut self, col: ucell, visible: Visibility)[src]

Visibility of the row

pub fn row_visible(&self, col: ucell) -> Visibility[src]

Returns the default cell style for this row.

pub fn set_row_height(
    &mut self,
    workbook: &mut WorkBook,
    row: ucell,
    height: Length
)
[src]

Creates a row-style and sets the row height.

pub fn used_grid_size(&self) -> (ucell, ucell)[src]

Returns a tuple of (max(row)+1, max(col)+1)

pub fn set_display(&mut self, display: bool)[src]

Is the sheet displayed?

pub fn display(&self) -> bool[src]

Is the sheet displayed?

pub fn set_print(&mut self, print: bool)[src]

Is the sheet printed?

pub fn print(&self) -> bool[src]

Is the sheet printed?

pub fn is_empty(&self, row: ucell, col: ucell) -> bool[src]

Returns true if there is no SCell at the given position.

pub fn cell(&self, row: ucell, col: ucell) -> Option<&SCell>[src]

Returns the cell if available.

pub fn cell_mut(&mut self, row: ucell, col: ucell) -> &mut SCell[src]

Ensures that there is a SCell at the given position and returns a reference to it.

pub fn add_cell(&mut self, row: ucell, col: ucell, cell: SCell) -> Option<SCell>[src]

Adds a cell. Replaces an existing one.

pub fn remove_cell(&mut self, row: ucell, col: ucell) -> Option<SCell>[src]

Removes a cell.

pub fn set_styled_value<V: Into<Value>>(
    &mut self,
    row: ucell,
    col: ucell,
    value: V,
    style: &CellStyleRef
)
[src]

Sets a value for the specified cell. Creates a new cell if necessary.

pub fn set_value<V: Into<Value>>(&mut self, row: ucell, col: ucell, value: V)[src]

Sets a value for the specified cell. Creates a new cell if necessary.

pub fn value(&self, row: ucell, col: ucell) -> &Value[src]

Returns a value

pub fn set_formula<V: Into<String>>(
    &mut self,
    row: ucell,
    col: ucell,
    formula: V
)
[src]

Sets a formula for the specified cell. Creates a new cell if necessary.

pub fn formula(&self, row: ucell, col: ucell) -> Option<&String>[src]

Returns a value

pub fn set_cellstyle(&mut self, row: ucell, col: ucell, style: &CellStyleRef)[src]

Sets the cell-style for the specified cell. Creates a new cell if necessary.

pub fn cellstyle(&self, row: ucell, col: ucell) -> Option<&String>[src]

Returns a value

pub fn set_row_span(&mut self, row: ucell, col: ucell, span: ucell)[src]

Sets the rowspan of the cell. Must be greater than 0.

pub fn row_span(&self, row: ucell, col: ucell) -> ucell[src]

Rowspan of the cell.

pub fn set_col_span(&mut self, row: ucell, col: ucell, span: ucell)[src]

Sets the colspan of the cell. Must be greater than 0.

pub fn col_span(&self, row: ucell, col: ucell) -> ucell[src]

Colspan of the cell.

pub fn set_header_rows(&mut self, row_start: ucell, row_end: ucell)[src]

Defines a range of rows as header rows.

pub fn clear_header_rows(&mut self)[src]

Clears the header-rows definition.

pub fn header_rows(&self) -> &Option<RowRange>[src]

Returns the header rows.

pub fn set_header_cols(&mut self, col_start: ucell, col_end: ucell)[src]

Defines a range of columns as header columns.

pub fn clear_header_cols(&mut self)[src]

Clears the header-columns definition.

pub fn header_cols(&self) -> &Option<ColRange>[src]

Returns the header columns.

pub fn add_print_range(&mut self, range: CellRange)[src]

Print ranges.

pub fn clear_print_ranges(&mut self)[src]

Remove print ranges.

pub fn print_ranges(&self) -> Option<&Vec<CellRange>>[src]

Return the print ranges.

Trait Implementations

impl Clone for Sheet[src]

impl Debug for Sheet[src]

impl Default for Sheet[src]

Auto Trait Implementations

impl RefUnwindSafe for Sheet

impl Send for Sheet

impl Sync for Sheet

impl Unpin for Sheet

impl UnwindSafe for Sheet

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.