Skip to main content

ExcelizeCore

Trait ExcelizeCore 

Source
pub trait ExcelizeCore {
    // Required methods
    fn check_sheet_name(name: &str) -> Result<()>;
    fn check_open_reader_options(&self) -> Result<()>;
    fn work_sheet_reader(&self, sheet: &str) -> Result<XlsxWorksheet>;
    fn update_linked_value(&self) -> Result<()>;
    fn add_vba_project(&self, data: &[u8]) -> Result<()>;
    fn set_content_type_part_project_extensions(
        &self,
        content_type: &str,
    ) -> Result<()>;
    fn set_workbook_props(&self, opts: &WorkbookPropsOptions) -> Result<()>;
    fn get_workbook_props(&self) -> Result<WorkbookPropsOptions>;
    fn set_calc_props(&self, opts: &CalcPropsOptions) -> Result<()>;
    fn get_calc_props(&self) -> Result<CalcPropsOptions>;
    fn protect_workbook(&self, opts: &WorkbookProtectionOptions) -> Result<()>;
    fn unprotect_workbook(&self, password: Option<&str>) -> Result<()>;
}
Expand description

Core methods that mirror the Go File API.

Required Methods§

Source

fn check_sheet_name(name: &str) -> Result<()>

Validate that a worksheet name is legal.

Source

fn check_open_reader_options(&self) -> Result<()>

Validate options used when opening a reader.

Source

fn work_sheet_reader(&self, sheet: &str) -> Result<XlsxWorksheet>

Deserialize and return a worksheet by name.

Source

fn update_linked_value(&self) -> Result<()>

Update linked cell values so Excel recalculates them on open.

Source

fn add_vba_project(&self, data: &[u8]) -> Result<()>

Add a VBA project binary to the workbook.

Source

fn set_content_type_part_project_extensions( &self, content_type: &str, ) -> Result<()>

Set the workbook content type and .bin default for macro workbooks.

Source

fn set_workbook_props(&self, opts: &WorkbookPropsOptions) -> Result<()>

Set workbook properties.

Source

fn get_workbook_props(&self) -> Result<WorkbookPropsOptions>

Get workbook properties.

Source

fn set_calc_props(&self, opts: &CalcPropsOptions) -> Result<()>

Set calculation properties.

Source

fn get_calc_props(&self) -> Result<CalcPropsOptions>

Get calculation properties.

Source

fn protect_workbook(&self, opts: &WorkbookProtectionOptions) -> Result<()>

Protect the workbook.

Source

fn unprotect_workbook(&self, password: Option<&str>) -> Result<()>

Remove workbook protection, optionally verifying the password.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§