Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 49 variants InvalidCellReference(String), InvalidRowNumber(u32), InvalidColumnNumber(u32), SheetNotFound { name: String, }, SheetAlreadyExists { name: String, }, InvalidSheetName(String), Io(Error), Zip(String), XmlParse(String), XmlDeserialize(String), ColumnWidthExceeded { width: f64, max: f64, }, RowHeightExceeded { height: f64, max: f64, }, CellValueTooLong { length: usize, max: usize, }, StyleNotFound { id: u32, }, CellStylesExceeded { max: usize, }, StreamRowAlreadyWritten { row: u32, }, StreamAlreadyFinished, StreamColumnsAfterRows, MergeCellOverlap { new: String, existing: String, }, MergeCellNotFound(String), InvalidDefinedName(String), DefinedNameNotFound { name: String, }, CircularReference { cell: String, }, UnknownFunction { name: String, }, WrongArgCount { name: String, expected: String, got: usize, }, FormulaError(String), PivotTableNotFound { name: String, }, PivotTableAlreadyExists { name: String, }, TableNotFound { name: String, }, TableAlreadyExists { name: String, }, InvalidSourceRange(String), SlicerNotFound { name: String, }, SlicerAlreadyExists { name: String, }, TableColumnNotFound { table: String, column: String, }, UnsupportedImageFormat { format: String, }, FileEncrypted, IncorrectPassword, UnsupportedEncryption(String), OutlineLevelExceeded { level: u8, max: u8, }, InvalidMergeCellReference(String), InvalidReference { reference: String, }, InvalidArgument(String), UnsupportedFileExtension(String), ZipSizeExceeded { size: u64, limit: u64, }, ZipEntryCountExceeded { count: usize, limit: usize, }, ThreadedCommentNotFound { id: String, }, ChartNotFound { sheet: String, cell: String, }, PictureNotFound { sheet: String, cell: String, }, Internal(String),
}
Expand description

The top-level error type for SheetKit.

Variants§

§

InvalidCellReference(String)

The given string is not a valid A1-style cell reference.

§

InvalidRowNumber(u32)

The row number is out of the allowed range (1..=1_048_576).

§

InvalidColumnNumber(u32)

The column number is out of the allowed range (1..=16_384).

§

SheetNotFound

No sheet with the given name exists in the workbook.

Fields

§name: String
§

SheetAlreadyExists

A sheet with the given name already exists.

Fields

§name: String
§

InvalidSheetName(String)

The sheet name violates Excel naming rules.

§

Io(Error)

An underlying I/O error.

§

Zip(String)

An error originating from the ZIP layer.

§

XmlParse(String)

An error encountered while parsing XML.

§

XmlDeserialize(String)

An error encountered while deserializing XML into typed structures.

§

ColumnWidthExceeded

Column width exceeds the allowed maximum (255).

Fields

§width: f64
§max: f64
§

RowHeightExceeded

Row height exceeds the allowed maximum (409).

Fields

§height: f64
§max: f64
§

CellValueTooLong

A cell value exceeds the maximum character limit.

Fields

§length: usize
§max: usize
§

StyleNotFound

The style ID was not found in the stylesheet.

Fields

§id: u32
§

CellStylesExceeded

Too many cell styles have been registered.

Fields

§max: usize
§

StreamRowAlreadyWritten

A row has already been written; rows must be written in ascending order.

Fields

§row: u32
§

StreamAlreadyFinished

The stream writer has already been finished.

§

StreamColumnsAfterRows

Column widths cannot be set after rows have been written.

§

MergeCellOverlap

Merge cell ranges overlap.

Fields

§existing: String
§

MergeCellNotFound(String)

The specified merge cell range was not found.

§

InvalidDefinedName(String)

The defined name is invalid.

§

DefinedNameNotFound

The specified defined name was not found.

Fields

§name: String
§

CircularReference

A circular reference was detected during formula evaluation.

Fields

§cell: String
§

UnknownFunction

The formula references an unknown function.

Fields

§name: String
§

WrongArgCount

A function received the wrong number of arguments.

Fields

§name: String
§expected: String
§got: usize
§

FormulaError(String)

A general formula evaluation error.

§

PivotTableNotFound

The specified pivot table was not found.

Fields

§name: String
§

PivotTableAlreadyExists

A pivot table with the given name already exists.

Fields

§name: String
§

TableNotFound

The specified table was not found.

Fields

§name: String
§

TableAlreadyExists

A table with the given name already exists.

Fields

§name: String
§

InvalidSourceRange(String)

The source data range for a pivot table is invalid.

§

SlicerNotFound

The specified slicer was not found.

Fields

§name: String
§

SlicerAlreadyExists

A slicer with the given name already exists.

Fields

§name: String
§

TableColumnNotFound

The specified column was not found in the table.

Fields

§table: String
§column: String
§

UnsupportedImageFormat

The image format is not supported.

Fields

§format: String
§

FileEncrypted

The file is encrypted and requires a password to open.

§

IncorrectPassword

The provided password is incorrect.

§

UnsupportedEncryption(String)

The encryption method is not supported.

§

OutlineLevelExceeded

The outline level exceeds the allowed maximum (7).

Fields

§level: u8
§max: u8
§

InvalidMergeCellReference(String)

A merge cell reference format is invalid.

§

InvalidReference

A cell range reference (sqref) is invalid.

Fields

§reference: String
§

InvalidArgument(String)

A function argument or configuration value is invalid.

§

UnsupportedFileExtension(String)

The file extension is not a supported OOXML spreadsheet format.

§

ZipSizeExceeded

The total decompressed size of the ZIP archive exceeds the safety limit.

Fields

§size: u64
§limit: u64
§

ZipEntryCountExceeded

The number of entries in the ZIP archive exceeds the safety limit.

Fields

§count: usize
§limit: usize
§

ThreadedCommentNotFound

The specified threaded comment was not found.

Fields

§

ChartNotFound

No chart was found at the specified cell.

Fields

§sheet: String
§cell: String
§

PictureNotFound

No picture was found at the specified cell.

Fields

§sheet: String
§cell: String
§

Internal(String)

An internal or otherwise unclassified error.

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

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<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

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.