pub struct Workbook {
pub path: String,
pub date_system: DateSystem,
/* private fields */
}
Expand description
The Workbook is the primary object you will use in this module. The public interface allows you to see the path of the workbook as well as its date system.
Example usage:
use xl::Workbook;
let mut wb = Workbook::open("tests/data/Book1.xlsx").unwrap();
Fields
path: String
date_system: DateSystem
Implementations
sourceimpl Workbook
impl Workbook
sourcepub fn sheets(&mut self) -> SheetMap
pub fn sheets(&mut self) -> SheetMap
Return SheetMap
of all sheets in this workbook. See SheetMap
class and associated
methods for more detailed documentation.
sourcepub fn new(path: &str) -> Result<Self, String>
pub fn new(path: &str) -> Result<Self, String>
Open an existing workbook (xlsx file). Returns a Result
in case there is an error opening
the workbook.
Example usage:
use xl::Workbook;
let mut wb = Workbook::open("tests/data/Book1.xlsx");
assert!(wb.is_ok());
// non-existant file
let mut wb = Workbook::open("Non-existant xlsx");
assert!(wb.is_err());
// non-xlsx file
let mut wb = Workbook::open("src/main.rs");
assert!(wb.is_err());
sourcepub fn sheet_reader<'a>(&'a mut self, zip_target: &str) -> SheetReader<'a>
pub fn sheet_reader<'a>(&'a mut self, zip_target: &str) -> SheetReader<'a>
Create a SheetReader for the given worksheet. A SheetReader
is a struct in the
xl::Worksheet
class that can be used to iterate over rows, etc. See documentation in the
xl::Worksheet
module for more information.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Workbook
impl Send for Workbook
impl Sync for Workbook
impl Unpin for Workbook
impl UnwindSafe for Workbook
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more