pub struct OpenOptions {
pub sheet_rows: Option<u32>,
pub sheets: Option<Vec<String>>,
pub max_unzip_size: Option<u64>,
pub max_zip_entries: Option<usize>,
}Expand description
Options for controlling how a workbook is opened and parsed.
All fields default to None (no limit / parse everything).
Use the builder-style setter methods for convenience.
Fields§
§sheet_rows: Option<u32>Maximum number of rows to read per sheet. Rows beyond this limit are silently discarded during parsing.
sheets: Option<Vec<String>>Only parse sheets whose names are in this list. Sheets not listed
are represented as empty worksheets (their XML is not parsed).
None means parse all sheets.
max_unzip_size: Option<u64>Maximum total decompressed size of all ZIP entries in bytes.
Exceeding this limit returns [Error::ZipSizeExceeded].
Default when None: no limit.
max_zip_entries: Option<usize>Maximum number of ZIP entries allowed.
Exceeding this limit returns [Error::ZipEntryCountExceeded].
Default when None: no limit.
Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub fn sheet_rows(self, rows: u32) -> Self
pub fn sheet_rows(self, rows: u32) -> Self
Set the maximum number of rows to read per sheet.
Sourcepub fn sheets(self, names: Vec<String>) -> Self
pub fn sheets(self, names: Vec<String>) -> Self
Only parse sheets whose names are in this list.
Sourcepub fn max_unzip_size(self, size: u64) -> Self
pub fn max_unzip_size(self, size: u64) -> Self
Set the maximum total decompressed size in bytes.
Sourcepub fn max_zip_entries(self, count: usize) -> Self
pub fn max_zip_entries(self, count: usize) -> Self
Set the maximum number of ZIP entries.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more