Struct calamine::Xls

source ·
pub struct Xls<RS> { /* private fields */ }
Expand description

A struct representing an old xls format file (CFB)

Implementations§

source§

impl<RS: Read + Seek> Xls<RS>

source

pub fn new_with_options( reader: RS, options: XlsOptions ) -> Result<Self, XlsError>

Creates a new instance using Options to inform parsing.

use calamine::{Xls,XlsOptions};

let mut options = XlsOptions::default();
// ...set options...
let workbook = Xls::new_with_options(reader, options)?;

Trait Implementations§

source§

impl<RS: Read + Seek> Reader<RS> for Xls<RS>

source§

fn metadata(&self) -> &Metadata

Parses Workbook stream, no need for the relationships variable

§

type Error = XlsError

Error specific to file type
source§

fn new(reader: RS) -> Result<Self, XlsError>

Creates a new instance.
source§

fn vba_project(&mut self) -> Option<Result<Cow<'_, VbaProject>, XlsError>>

Gets VbaProject
source§

fn worksheet_range(&mut self, name: &str) -> Result<Range<Data>, XlsError>

Read worksheet data in corresponding worksheet path
source§

fn worksheets(&mut self) -> Vec<(String, Range<Data>)>

Fetch all worksheet data & paths
source§

fn worksheet_formula(&mut self, name: &str) -> Result<Range<String>, XlsError>

Read worksheet formula in corresponding worksheet path
source§

fn sheet_names(&self) -> Vec<String>

Get all sheet names of this workbook, in workbook order Read more
source§

fn sheets_metadata(&self) -> &[Sheet]

Fetch all sheets metadata
source§

fn defined_names(&self) -> &[(String, String)]

Get all defined names (Ranges names etc)
source§

fn worksheet_range_at( &mut self, n: usize ) -> Option<Result<Range<Data>, Self::Error>>

Get the nth worksheet. Shortcut for getting the nth sheet_name, then the corresponding worksheet.

Auto Trait Implementations§

§

impl<RS> RefUnwindSafe for Xls<RS>
where RS: RefUnwindSafe,

§

impl<RS> Send for Xls<RS>
where RS: Send,

§

impl<RS> Sync for Xls<RS>
where RS: Sync,

§

impl<RS> Unpin for Xls<RS>
where RS: Unpin,

§

impl<RS> UnwindSafe for Xls<RS>
where RS: UnwindSafe,

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.