excelreader 2.1.3

Read Excel/CSV workbooks via ExcelReader's native ABI (open + schema-driven typed parse).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fmt;

/// A native ExcelReader error: `code` is one of the `XL_*` status constants, `message` is the
/// detail from `xl_last_error_ptr` on the calling thread at the time of failure.
#[derive(Debug, Clone)]
pub struct Error {
    pub code: i32,
    pub message: String,
}

impl fmt::Display for Error {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "ExcelReader error {}: {}", self.code, self.message)
    }
}

impl std::error::Error for Error {}