Struct spreadsheet_ods::WorkBook[][src]

pub struct WorkBook { /* fields omitted */ }

Book is the main structure for the Spreadsheet.

Implementations

impl WorkBook[src]

pub fn new() -> Self[src]

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

Set ODS version.

pub fn set_version(&mut self, version: String)[src]

ODS version.

pub fn num_sheets(&self) -> usize[src]

Number of sheets.

pub fn sheet(&self, n: usize) -> &Sheet[src]

Returns a certain sheet.

Panics

Panics if n does not exist.

pub fn sheet_mut(&mut self, n: usize) -> &mut Sheet[src]

Returns a certain sheet.

Panic

Panics if n does not exist.

pub fn insert_sheet(&mut self, i: usize, sheet: Sheet)[src]

Inserts the sheet at the given position.

pub fn push_sheet(&mut self, sheet: Sheet)[src]

Appends a sheet.

pub fn remove_sheet(&mut self, n: usize) -> Sheet[src]

Removes a sheet from the table.

pub fn add_def_style(&mut self, value_type: ValueType, style: &CellStyleRef)[src]

Adds a default-style for all new values. This information is only used when writing the data to the ODS file.

pub fn def_style(&self, value_type: ValueType) -> Option<&String>[src]

Returns the default style name.

pub fn find_value_format(&self, style_name: &str) -> Option<&ValueFormat>[src]

Finds a ValueFormat starting with the stylename attached to a cell.

pub fn add_font(&mut self, font: FontFaceDecl)[src]

Adds a font.

pub fn remove_font(&mut self, name: &str) -> Option<FontFaceDecl>[src]

Removes a font.

pub fn font(&self, name: &str) -> Option<&FontFaceDecl>[src]

Returns the FontDecl.

pub fn font_mut(&mut self, name: &str) -> Option<&mut FontFaceDecl>[src]

Returns a mutable FontDecl.

pub fn add_tablestyle(&mut self, style: TableStyle) -> TableStyleRef[src]

Adds a style.

pub fn remove_tablestyle(&mut self, name: &str) -> Option<TableStyle>[src]

Removes a style.

pub fn tablestyle(&self, name: &str) -> Option<&TableStyle>[src]

Returns the style.

pub fn tablestyle_mut(&mut self, name: &str) -> Option<&mut TableStyle>[src]

Returns the mutable style.

pub fn add_rowstyle(&mut self, style: RowStyle) -> RowStyleRef[src]

Adds a style.

pub fn remove_rowstyle(&mut self, name: &str) -> Option<RowStyle>[src]

Removes a style.

pub fn rowstyle(&self, name: &str) -> Option<&RowStyle>[src]

Returns the style.

pub fn rowstyle_mut(&mut self, name: &str) -> Option<&mut RowStyle>[src]

Returns the mutable style.

pub fn add_colstyle(&mut self, style: ColStyle) -> ColStyleRef[src]

Adds a style.

pub fn remove_colstyle(&mut self, name: &str) -> Option<ColStyle>[src]

Removes a style.

pub fn colstyle(&self, name: &str) -> Option<&ColStyle>[src]

Returns the style.

pub fn colstyle_mut(&mut self, name: &str) -> Option<&mut ColStyle>[src]

Returns the mutable style.

pub fn add_cellstyle(&mut self, style: CellStyle) -> CellStyleRef[src]

Adds a style.

pub fn remove_cellstyle(&mut self, name: &str) -> Option<CellStyle>[src]

Removes a style.

pub fn cellstyle(&self, name: &str) -> Option<&CellStyle>[src]

Returns the style.

pub fn cellstyle_mut(&mut self, name: &str) -> Option<&mut CellStyle>[src]

Returns the mutable style.

pub fn add_paragraphstyle(&mut self, style: ParagraphStyle) -> ParagraphStyleRef[src]

Adds a style.

pub fn remove_paragraphstyle(&mut self, name: &str) -> Option<ParagraphStyle>[src]

Removes a style.

pub fn paragraphstyle(&self, name: &str) -> Option<&ParagraphStyle>[src]

Returns the style.

pub fn paragraphstyle_mut(&mut self, name: &str) -> Option<&mut ParagraphStyle>[src]

Returns the mutable style.

pub fn add_textstyle(&mut self, style: TextStyle) -> TextStyleRef[src]

Adds a style.

pub fn remove_textstyle(&mut self, name: &str) -> Option<TextStyle>[src]

Removes a style.

pub fn textstyle(&self, name: &str) -> Option<&TextStyle>[src]

Returns the style.

pub fn textstyle_mut(&mut self, name: &str) -> Option<&mut TextStyle>[src]

Returns the mutable style.

pub fn add_graphicstyle(&mut self, style: GraphicStyle) -> GraphicStyleRef[src]

Adds a style.

pub fn remove_graphicstyle(&mut self, name: &str) -> Option<GraphicStyle>[src]

Removes a style.

pub fn graphicstyle(&self, name: &str) -> Option<&GraphicStyle>[src]

Returns the style.

pub fn graphicstyle_mut(&mut self, name: &str) -> Option<&mut GraphicStyle>[src]

Returns the mutable style.

pub fn add_format(&mut self, vstyle: ValueFormat) -> ValueFormatRef[src]

Adds a value format.

pub fn remove_format(&mut self, name: &str) -> Option<ValueFormat>[src]

Removes the format.

pub fn format(&self, name: &str) -> Option<&ValueFormat>[src]

Returns the format.

pub fn format_mut(&mut self, name: &str) -> Option<&mut ValueFormat>[src]

Returns the mutable format.

pub fn add_pagestyle(&mut self, pstyle: PageStyle) -> PageStyleRef[src]

Adds a value PageStyle.

pub fn remove_pagestyle(&mut self, name: &str) -> Option<PageStyle>[src]

Removes the PageStyle.

pub fn pagestyle(&self, name: &str) -> Option<&PageStyle>[src]

Returns the PageStyle.

pub fn pagestyle_mut(&mut self, name: &str) -> Option<&mut PageStyle>[src]

Returns the mutable PageStyle.

pub fn add_masterpage(&mut self, mpage: MasterPage) -> MasterPageRef[src]

Adds a value MasterPage.

pub fn remove_masterpage(&mut self, name: &str) -> Option<MasterPage>[src]

Removes the MasterPage.

pub fn masterpage(&self, name: &str) -> Option<&MasterPage>[src]

Returns the MasterPage.

pub fn masterpage_mut(&mut self, name: &str) -> Option<&mut MasterPage>[src]

Returns the mutable MasterPage.

Trait Implementations

impl Clone for WorkBook[src]

impl Debug for WorkBook[src]

impl Default for WorkBook[src]

Auto Trait Implementations

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.