pub struct OdsOptions { /* private fields */ }
Expand description

Read options for ods-files.

Implementations§

source§

impl OdsOptions

source

pub fn content_only(self) -> Self

Parse the content only.

Doesn’t buffer any extra files and ignores styles etc. This saves quite some time if only the cell-data is needed.

source

pub fn read_styles(self) -> Self

Parse everything.

Reads styles and buffers extra files. This is the default. If the data will be written again this options should be used.

source

pub fn use_repeat_for_cells(self) -> Self

The value of table:number-columns-repeated is stored as part of the cell-data, and the cell-data is not duplicated. The cell-data can only be found at the original row/col.

This can save a bit of time when reading, but makes working with the data harder. Keeping track of overlapping cells makes this tricky.

source

pub fn use_clone_for_cells(self) -> Self

Cells are cloned based on their table:number-columns-repeated.

This is the default behaviour. The cell-data can be found at each row/col that the repeat count includes.

Most of the time the repeat-count is used for empty cells to fill the required structure. These completely empty cells are always dumped.

See: ignore_empty_cells().

source

pub fn ignore_empty_cells(self) -> Self

Ignores cells without value and formula.

This can be useful, if only the data is needed. If you store such a spreadsheet you will loose cell-formating, spans etc.

source

pub fn read_empty_cells(self) -> Self

Reads cells without value and formula.

This is the default behaviour. As such cells can have a style, annotations etc it is recommended to use this option.

Cells without any information, that are only structural are always ignored.

source

pub fn read_ods<T: Read + Seek>(&self, read: T) -> Result<WorkBook, OdsError>

Reads a .ods file.

source

pub fn read_fods<T: BufRead>(&self, read: T) -> Result<WorkBook, OdsError>

Reads a flat .fods file.

Trait Implementations§

source§

impl Debug for OdsOptions

source§

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

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

impl Default for OdsOptions

source§

fn default() -> OdsOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.