Skip to main content

XlsxError

Enum XlsxError 

Source
pub enum XlsxError {
Show 29 variants Io(Error), Zip(ZipError), Vba(VbaError), Xml(Error), XmlAttr(AttrError), Parse(ParseError), ParseFloat(ParseFloatError), ParseInt(ParseIntError), XmlEof(&'static str), UnexpectedNode(&'static str), FileNotFound(String), RelationshipNotFound, Alphanumeric(u8), NumericColumn(u8), RangeWithoutColumnComponent, RangeWithoutRowComponent, ColumnNumberOverflow, RowNumberOverflow, DimensionCount(usize), CellTAttribute(String), Unexpected(&'static str), Unrecognized { typ: &'static str, val: String, }, CellError(String), Password, WorksheetNotFound(String), TableNotFound(String), NotAWorksheet(String), Encoding(EncodingError), PivotTableNotFound(String),
}
Expand description

An enum for Xlsx specific errors.

Variants§

§

Io(Error)

A wrapper for a variety of std::io::Error errors such as file permissions when reading an XLSX file. This can be caused by a non-existent file or parent directory or, commonly on Windows, if the file is already open in Excel.

§

Zip(ZipError)

A wrapper for a variety of zip::result::ZipError errors from zip::ZipWriter. These relate to errors arising from reading the XLSX file zip container.

§

Vba(VbaError)

A general error when reading a VBA project from an XLSX file.

§

Xml(Error)

A wrapper for a variety of quick_xml::Error XML parsing errors, but most commonly for missing data in the target file.

§

XmlAttr(AttrError)

A wrapper for a variety of quick_xml::events::attributes::AttrError errors related to attributes in XML elements.

§

Parse(ParseError)

A wrapper for a variety of std::string::ParseError errors when parsing strings.

§

ParseFloat(ParseFloatError)

A wrapper for a variety of std::num::ParseFloatError errors when parsing floats.

§

ParseInt(ParseIntError)

A wrapper for a variety of std::num::ParseIntError errors when parsing integers.

§

XmlEof(&'static str)

Unexpected end of XML file, usually when an end tag is missing.

§

UnexpectedNode(&'static str)

Unexpected node in XML.

§

FileNotFound(String)

XML file not found in XLSX container.

§

RelationshipNotFound

Relationship file not found in XLSX container.

§

Alphanumeric(u8)

Non alphanumeric character found when parsing A1 style range string.

§

NumericColumn(u8)

Error when parsing the column name in a A1 style range string.

§

RangeWithoutColumnComponent

Missing column name when parsing an A1 style range string.

§

RangeWithoutRowComponent

Missing row number when parsing an A1 style range string.

§

ColumnNumberOverflow

Column number exceeds maximum allowed columns.

§

RowNumberOverflow

Row number exceeds maximum allowed rows.

§

DimensionCount(usize)

Error when parsing dimensions of a worksheet.

§

CellTAttribute(String)

Unknown cell type (t) attribute.

§

Unexpected(&'static str)

Unexpected XML element or attribute error.

§

Unrecognized

Unrecognized worksheet type or state.

Fields

§typ: &'static str

The data type.

§val: String

The value found.

§

CellError(String)

Unrecognized cell error type.

§

Password

Workbook is password protected.

§

WorksheetNotFound(String)

Specified worksheet was not found.

§

TableNotFound(String)

Specified worksheet Table was not found.

§

NotAWorksheet(String)

The specified sheet is not a worksheet.

§

Encoding(EncodingError)

A wrapper for a variety of quick_xml::encoding::EncodingError encoding errors.

§

PivotTableNotFound(String)

Specified Pivot Table was not found on worksheet.

Trait Implementations§

Source§

impl Debug for XlsxError

Source§

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

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

impl Display for XlsxError

Source§

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

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

impl Error for XlsxError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AttrError> for XlsxError

Source§

fn from(e: AttrError) -> XlsxError

Converts to this type from the input type.
Source§

impl From<EncodingError> for XlsxError

Source§

fn from(e: EncodingError) -> XlsxError

Converts to this type from the input type.
Source§

impl From<Error> for XlsxError

Source§

fn from(e: Error) -> XlsxError

Converts to this type from the input type.
Source§

impl From<Error> for XlsxError

Source§

fn from(e: Error) -> XlsxError

Converts to this type from the input type.
Source§

impl From<ParseFloatError> for XlsxError

Source§

fn from(e: ParseFloatError) -> XlsxError

Converts to this type from the input type.
Source§

impl From<ParseIntError> for XlsxError

Source§

fn from(e: ParseIntError) -> XlsxError

Converts to this type from the input type.
Source§

impl From<VbaError> for XlsxError

Source§

fn from(e: VbaError) -> XlsxError

Converts to this type from the input type.
Source§

impl From<XlsxError> for Error

Source§

fn from(e: XlsxError) -> Error

Converts to this type from the input type.
Source§

impl From<ZipError> for XlsxError

Source§

fn from(e: ZipError) -> XlsxError

Converts to this type from the input type.

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.