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.
SheetAlreadyExists
A sheet with the given name already exists.
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).
RowHeightExceeded
Row height exceeds the allowed maximum (409).
CellValueTooLong
A cell value exceeds the maximum character limit.
StyleNotFound
The style ID was not found in the stylesheet.
CellStylesExceeded
Too many cell styles have been registered.
StreamRowAlreadyWritten
A row has already been written; rows must be written in ascending order.
StreamAlreadyFinished
The stream writer has already been finished.
StreamColumnsAfterRows
Column widths cannot be set after rows have been written.
MergeCellOverlap
Merge cell ranges overlap.
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.
CircularReference
A circular reference was detected during formula evaluation.
UnknownFunction
The formula references an unknown function.
WrongArgCount
A function received the wrong number of arguments.
FormulaError(String)
A general formula evaluation error.
PivotTableNotFound
The specified pivot table was not found.
PivotTableAlreadyExists
A pivot table with the given name already exists.
TableNotFound
The specified table was not found.
TableAlreadyExists
A table with the given name already exists.
InvalidSourceRange(String)
The source data range for a pivot table is invalid.
SlicerNotFound
The specified slicer was not found.
SlicerAlreadyExists
A slicer with the given name already exists.
TableColumnNotFound
The specified column was not found in the table.
UnsupportedImageFormat
The image format is not supported.
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).
InvalidMergeCellReference(String)
A merge cell reference format is invalid.
InvalidReference
A cell range reference (sqref) is invalid.
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.
ZipEntryCountExceeded
The number of entries in the ZIP archive exceeds the safety limit.
ThreadedCommentNotFound
The specified threaded comment was not found.
ChartNotFound
No chart was found at the specified cell.
PictureNotFound
No picture was found at the specified cell.
Internal(String)
An internal or otherwise unclassified error.