rust_excel_core/error.rs
1/// Errors that can occur during Excel operations.
2#[derive(thiserror::Error, Debug)]
3pub enum ExcelError {
4 #[error("IO error: {0}")]
5 Io(#[from] std::io::Error),
6
7 #[error("Sheet not found: {0}")]
8 SheetNotFound(String),
9
10 #[error("Invalid cell reference: row={0}, col={1}")]
11 InvalidCell(u32, u32),
12
13 #[error("Spreadsheet error: {0}")]
14 Spreadsheet(String),
15
16 #[error("Sheet already exists: {0}")]
17 SheetAlreadyExists(String),
18}
19
20pub type ExcelResult<T> = Result<T, ExcelError>;