calamine

Struct Xlsx

Source
pub struct Xlsx<RS> { /* private fields */ }
Expand description

A struct representing xml zipped excel file Xlsx, Xlsm, Xlam

Implementations§

Source§

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

Source

pub fn load_merged_regions(&mut self) -> Result<(), XlsxError>

Load the merged regions

Source

pub fn merged_regions(&self) -> &Vec<(String, String, Dimensions)>

Get the merged regions of all the sheets

Source

pub fn merged_regions_by_sheet( &self, name: &str, ) -> Vec<(&String, &String, &Dimensions)>

Get the merged regions by sheet name

Source

pub fn load_tables(&mut self) -> Result<(), XlsxError>

Load the tables from

Source

pub fn table_names(&self) -> Vec<&String>

Get the names of all the tables

Source

pub fn table_names_in_sheet(&self, sheet_name: &str) -> Vec<&String>

Get the names of all the tables in a sheet

Source

pub fn table_by_name( &mut self, table_name: &str, ) -> Result<Table<Data>, XlsxError>

Get the table by name (owned)

Source

pub fn table_by_name_ref( &mut self, table_name: &str, ) -> Result<Table<DataRef<'_>>, XlsxError>

Get the table by name (ref)

Source

pub fn worksheet_merge_cells( &mut self, name: &str, ) -> Option<Result<Vec<Dimensions>, XlsxError>>

Gets the worksheet merge cell dimensions

Source

pub fn worksheet_merge_cells_at( &mut self, n: usize, ) -> Option<Result<Vec<Dimensions>, XlsxError>>

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

Source§

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

Source

pub fn worksheet_cells_reader<'a>( &'a mut self, name: &str, ) -> Result<XlsxCellReader<'a>, XlsxError>

Get a reader over all used cells in the given worksheet cell reader

Trait Implementations§

Source§

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

Source§

type Error = XlsxError

Error specific to file type
Source§

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

Creates a new instance.
Source§

fn with_header_row(&mut self, header_row: HeaderRow) -> &mut Self

Set header row (i.e. first row to be read) If header_row is None, the first non-empty row will be used as header row
Source§

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

Gets VbaProject
Source§

fn metadata(&self) -> &Metadata

Initialize
Source§

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

Read worksheet data in corresponding worksheet path
Source§

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

Read worksheet formula in corresponding worksheet path
Source§

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

Fetch all worksheet data & paths
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.
Source§

impl<RS: Read + Seek> ReaderRef<RS> for Xlsx<RS>

Source§

fn worksheet_range_ref<'a>( &'a mut self, name: &str, ) -> Result<Range<DataRef<'a>>, XlsxError>

Get worksheet range where shared string values are only borrowed. Read more
Source§

fn worksheet_range_at_ref( &mut self, n: usize, ) -> Option<Result<Range<DataRef<'_>>, Self::Error>>

Get the nth worksheet range where shared string values are only borrowed. Shortcut for getting the nth sheet_name, then the corresponding worksheet. Read more

Auto Trait Implementations§

§

impl<RS> Freeze for Xlsx<RS>
where RS: Freeze,

§

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

§

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

§

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

§

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

§

impl<RS> UnwindSafe for Xlsx<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>,

Source§

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>,

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.