pub struct File {Show 27 fields
pub path: Mutex<String>,
pub options: Mutex<Options>,
pub sheet_count: Mutex<i32>,
pub pkg: DashMap<String, Vec<u8>>,
pub sheet: DashMap<String, XlsxWorksheet>,
pub relationships: DashMap<String, XlsxRelationships>,
pub temp_files: DashMap<String, String>,
pub sheet_map: Mutex<HashMap<String, String>>,
pub xml_attr: DashMap<String, String>,
pub checked: DashMap<String, bool>,
pub zip64_entries: Mutex<Vec<String>>,
pub content_types: Mutex<Option<XlsxTypes>>,
pub styles: Mutex<Option<XlsxStyleSheet>>,
pub workbook: Mutex<Option<XlsxWorkbook>>,
pub calc_chain: Mutex<Option<XlsxCalcChain>>,
pub volatile_deps: Mutex<Option<XlsxVolTypes>>,
pub calc_cache: Mutex<HashMap<String, String>>,
pub calc_raw_cache: Mutex<HashMap<String, String>>,
pub formula_arg_cache: Mutex<HashMap<String, FormulaArg>>,
pub theme: Mutex<Option<DecodeTheme>>,
pub shared_strings: Mutex<Option<XlsxSst>>,
pub shared_strings_map: Mutex<HashMap<String, i32>>,
pub drawings: DashMap<String, XlsxWsDr>,
pub comments: DashMap<String, XlsxComments>,
pub vml_drawing: DashMap<String, VmlDrawing>,
pub charset_transcoder: Mutex<Option<CharsetTranscoderFn>>,
pub zip_writer_factory: Mutex<Option<ZipWriterFactory>>,
/* private fields */
}Expand description
Populated spreadsheet file.
Fields§
§path: Mutex<String>Path used by Save.
options: Mutex<Options>User-provided options.
sheet_count: Mutex<i32>Number of worksheets in the workbook.
pkg: DashMap<String, Vec<u8>>In-memory package parts (path → raw bytes).
sheet: DashMap<String, XlsxWorksheet>Parsed worksheets (path → worksheet).
relationships: DashMap<String, XlsxRelationships>Parsed relationship parts (path → relationships).
temp_files: DashMap<String, String>Temporary file mapping (path → filesystem path).
sheet_map: Mutex<HashMap<String, String>>Map of worksheet names to XML paths.
xml_attr: DashMap<String, String>Captured root namespace attributes for each XML part.
checked: DashMap<String, bool>Marks worksheets that have already been validated.
zip64_entries: Mutex<Vec<String>>Entries that exceed 4GB and need a ZIP64 LFH patch.
content_types: Mutex<Option<XlsxTypes>>Lazily loaded [Content_Types].xml.
styles: Mutex<Option<XlsxStyleSheet>>Lazily loaded xl/styles.xml.
workbook: Mutex<Option<XlsxWorkbook>>Lazily loaded xl/workbook.xml.
calc_chain: Mutex<Option<XlsxCalcChain>>Lazily loaded xl/calcChain.xml.
volatile_deps: Mutex<Option<XlsxVolTypes>>Lazily loaded xl/volatileDependencies.xml.
calc_cache: Mutex<HashMap<String, String>>Cached calculated cell values (formatted).
calc_raw_cache: Mutex<HashMap<String, String>>Cached calculated cell values (raw).
formula_arg_cache: Mutex<HashMap<String, FormulaArg>>Cached formula argument values for dependent cell reuse.
theme: Mutex<Option<DecodeTheme>>Lazily loaded theme part.
Lazily loaded shared string table.
Index map for shared strings.
drawings: DashMap<String, XlsxWsDr>Parsed worksheet drawings (path → drawing).
comments: DashMap<String, XlsxComments>Parsed comments parts (path → comments).
vml_drawing: DashMap<String, VmlDrawing>Parsed VML drawings (path → VML drawing).
charset_transcoder: Mutex<Option<CharsetTranscoderFn>>Optional codepage transcoder for non-UTF-8 XML package parts.
zip_writer_factory: Mutex<Option<ZipWriterFactory>>Optional ZIP writer factory used when saving the workbook.
Implementations§
Source§impl File
impl File
Source§impl File
impl File
Sourcepub fn calc_chain_reader(&self) -> Result<XlsxCalcChain>
pub fn calc_chain_reader(&self) -> Result<XlsxCalcChain>
Lazy reader for xl/calcChain.xml.
Sourcepub fn calc_chain_writer(&self)
pub fn calc_chain_writer(&self)
Serialize and save xl/calcChain.xml if it contains entries.
Sourcepub fn delete_calc_chain(&self, index: i32, cell: &str) -> Result<()>
pub fn delete_calc_chain(&self, index: i32, cell: &str) -> Result<()>
Remove a cell reference from the calculation chain.
Sourcepub fn volatile_deps_reader(&self) -> Result<Option<XlsxVolTypes>>
pub fn volatile_deps_reader(&self) -> Result<Option<XlsxVolTypes>>
Lazy reader for xl/volatileDependencies.xml.
Sourcepub fn volatile_deps_writer(&self)
pub fn volatile_deps_writer(&self)
Serialize and save xl/volatileDependencies.xml.
Source§impl File
impl File
Sourcepub fn set_cell_value(
&self,
sheet: &str,
cell: &str,
value: impl Into<CellValue>,
) -> Result<()>
pub fn set_cell_value( &self, sheet: &str, cell: &str, value: impl Into<CellValue>, ) -> Result<()>
Set the value of a cell.
Sourcepub fn get_cell_value(&self, sheet: &str, cell: &str) -> Result<String>
pub fn get_cell_value(&self, sheet: &str, cell: &str) -> Result<String>
Get the raw string value of a cell.
Sourcepub fn get_cell_value_with_options(
&self,
sheet: &str,
cell: &str,
raw: bool,
) -> Result<String>
pub fn get_cell_value_with_options( &self, sheet: &str, cell: &str, raw: bool, ) -> Result<String>
Get the formatted value of a cell, optionally bypassing number formatting.
Sourcepub fn get_cell_type(&self, sheet: &str, cell: &str) -> Result<CellType>
pub fn get_cell_type(&self, sheet: &str, cell: &str) -> Result<CellType>
Get the data type of a cell.
Sourcepub fn set_cell_str(&self, sheet: &str, cell: &str, value: &str) -> Result<()>
pub fn set_cell_str(&self, sheet: &str, cell: &str, value: &str) -> Result<()>
Set a cell to a string value.
Sourcepub fn set_cell_int(&self, sheet: &str, cell: &str, value: i64) -> Result<()>
pub fn set_cell_int(&self, sheet: &str, cell: &str, value: i64) -> Result<()>
Set a cell to an integer value.
Sourcepub fn set_cell_uint(&self, sheet: &str, cell: &str, value: u64) -> Result<()>
pub fn set_cell_uint(&self, sheet: &str, cell: &str, value: u64) -> Result<()>
Set a cell to an unsigned integer value.
Sourcepub fn set_cell_float(&self, sheet: &str, cell: &str, value: f64) -> Result<()>
pub fn set_cell_float(&self, sheet: &str, cell: &str, value: f64) -> Result<()>
Set a cell to a floating point value.
Sourcepub fn set_cell_float_with_precision(
&self,
sheet: &str,
cell: &str,
value: f64,
precision: i32,
bit_size: i32,
) -> Result<()>
pub fn set_cell_float_with_precision( &self, sheet: &str, cell: &str, value: f64, precision: i32, bit_size: i32, ) -> Result<()>
Set a cell to a floating point value with explicit precision and bit size.
precision of -1 uses as many decimal places as necessary. bit_size
should be 32 for f32 values and 64 for f64 values.
Sourcepub fn set_cell_bool(&self, sheet: &str, cell: &str, value: bool) -> Result<()>
pub fn set_cell_bool(&self, sheet: &str, cell: &str, value: bool) -> Result<()>
Set a cell to a boolean value.
Sourcepub fn set_cell_default(
&self,
sheet: &str,
cell: &str,
value: &str,
) -> Result<()>
pub fn set_cell_default( &self, sheet: &str, cell: &str, value: &str, ) -> Result<()>
Set a cell to a string value without escaping it as a shared string.
Sourcepub fn set_cell_formula(
&self,
sheet: &str,
cell: &str,
formula: &str,
) -> Result<()>
pub fn set_cell_formula( &self, sheet: &str, cell: &str, formula: &str, ) -> Result<()>
Set a cell formula.
Sourcepub fn set_cell_formula_with_opts(
&self,
sheet: &str,
cell: &str,
formula: &str,
opts: &[FormulaOpts],
) -> Result<()>
pub fn set_cell_formula_with_opts( &self, sheet: &str, cell: &str, formula: &str, opts: &[FormulaOpts], ) -> Result<()>
Set a cell formula with optional formula type and reference range.
Sourcepub fn get_cell_formula(&self, sheet: &str, cell: &str) -> Result<String>
pub fn get_cell_formula(&self, sheet: &str, cell: &str) -> Result<String>
Get the formula from a cell.
Sourcepub fn get_cell_style(&self, sheet: &str, cell: &str) -> Result<i32>
pub fn get_cell_style(&self, sheet: &str, cell: &str) -> Result<i32>
Get the style index applied to a cell.
If the cell has no explicit style, the row style and then the column style are returned, matching Excel’s inheritance behavior.
Sourcepub fn set_cell_style(
&self,
sheet: &str,
top_left_cell: &str,
bottom_right_cell: &str,
style_id: i32,
) -> Result<()>
pub fn set_cell_style( &self, sheet: &str, top_left_cell: &str, bottom_right_cell: &str, style_id: i32, ) -> Result<()>
Apply a style index to a range of cells.
The range is defined by top_left_cell and bottom_right_cell. The
corners are normalized automatically, so B3:A1 is equivalent to
A1:B3. Passing the same cell for both corners styles a single cell.
Sourcepub fn set_cell_rich_text(
&self,
sheet: &str,
cell: &str,
runs: Vec<RichTextRun>,
) -> Result<()>
pub fn set_cell_rich_text( &self, sheet: &str, cell: &str, runs: Vec<RichTextRun>, ) -> Result<()>
Set rich text runs to a cell.
Sourcepub fn get_cell_rich_text(
&self,
sheet: &str,
cell: &str,
) -> Result<Vec<RichTextRun>>
pub fn get_cell_rich_text( &self, sheet: &str, cell: &str, ) -> Result<Vec<RichTextRun>>
Get rich text runs from a cell.
Sourcepub fn get_cell_hyperlink(
&self,
sheet: &str,
cell: &str,
) -> Result<(bool, String)>
pub fn get_cell_hyperlink( &self, sheet: &str, cell: &str, ) -> Result<(bool, String)>
Get a cell hyperlink.
Returns (true, link) if the cell has a hyperlink, otherwise
(false, "").
Sourcepub fn get_hyperlink_cells(
&self,
sheet: &str,
link_type: &str,
) -> Result<Vec<String>>
pub fn get_hyperlink_cells( &self, sheet: &str, link_type: &str, ) -> Result<Vec<String>>
Get all cell references which contain hyperlinks in a worksheet.
link_type may be "External", "Location", "None" or empty.
Sourcepub fn set_cell_hyperlink(
&self,
sheet: &str,
cell: &str,
link: &str,
link_type: &str,
opts: &[HyperlinkOpts],
) -> Result<()>
pub fn set_cell_hyperlink( &self, sheet: &str, cell: &str, link: &str, link_type: &str, opts: &[HyperlinkOpts], ) -> Result<()>
Set a cell hyperlink.
Source§impl File
impl File
Sourcepub fn add_chart(
&mut self,
sheet: &str,
cell: &str,
chart: &Chart,
) -> Result<()>
pub fn add_chart( &mut self, sheet: &str, cell: &str, chart: &Chart, ) -> Result<()>
Add a chart to a worksheet.
Sourcepub fn add_chart_sheet(&mut self, sheet: &str, chart: &Chart) -> Result<()>
pub fn add_chart_sheet(&mut self, sheet: &str, chart: &Chart) -> Result<()>
Create a chartsheet (a worksheet containing only a chart).
Source§impl File
impl File
Sourcepub fn set_col_width(
&self,
sheet: &str,
start_col: &str,
end_col: &str,
width: f64,
) -> Result<()>
pub fn set_col_width( &self, sheet: &str, start_col: &str, end_col: &str, width: f64, ) -> Result<()>
Set the width of one or more columns.
Sourcepub fn set_col_visible(
&self,
sheet: &str,
start_col: &str,
end_col: &str,
visible: bool,
) -> Result<()>
pub fn set_col_visible( &self, sheet: &str, start_col: &str, end_col: &str, visible: bool, ) -> Result<()>
Set the visibility of one or more columns.
Sourcepub fn get_col_visible(&self, sheet: &str, col: &str) -> Result<bool>
pub fn get_col_visible(&self, sheet: &str, col: &str) -> Result<bool>
Get the visibility of a column.
Sourcepub fn set_col_outline_level(
&self,
sheet: &str,
start_col: &str,
end_col: &str,
level: u8,
) -> Result<()>
pub fn set_col_outline_level( &self, sheet: &str, start_col: &str, end_col: &str, level: u8, ) -> Result<()>
Set the outline level of one or more columns.
Sourcepub fn get_col_outline_level(&self, sheet: &str, col: &str) -> Result<u8>
pub fn get_col_outline_level(&self, sheet: &str, col: &str) -> Result<u8>
Get the outline level of a column.
Sourcepub fn insert_cols(&self, sheet: &str, col: &str, n: usize) -> Result<()>
pub fn insert_cols(&self, sheet: &str, col: &str, n: usize) -> Result<()>
Insert n columns before col.
Sourcepub fn set_col_style(
&self,
sheet: &str,
start_col: &str,
end_col: &str,
style_id: i32,
) -> Result<()>
pub fn set_col_style( &self, sheet: &str, start_col: &str, end_col: &str, style_id: i32, ) -> Result<()>
Apply a style index to one or more columns.
Source§impl File
impl File
Sourcepub fn add_data_validation(
&self,
sheet: &str,
dv: &DataValidation,
) -> Result<()>
pub fn add_data_validation( &self, sheet: &str, dv: &DataValidation, ) -> Result<()>
Add a data validation rule to a worksheet.
Sourcepub fn get_data_validations(&self, sheet: &str) -> Result<Vec<DataValidation>>
pub fn get_data_validations(&self, sheet: &str) -> Result<Vec<DataValidation>>
Get the data validation rules for a worksheet.
Source§impl File
impl File
Sourcepub fn set_app_props(&mut self, props: &AppProperties) -> Result<()>
pub fn set_app_props(&mut self, props: &AppProperties) -> Result<()>
Set the document application properties (docProps/app.xml).
Sourcepub fn get_app_props(&self) -> Result<AppProperties>
pub fn get_app_props(&self) -> Result<AppProperties>
Get the document application properties.
Sourcepub fn set_doc_props(&mut self, props: &DocProperties) -> Result<()>
pub fn set_doc_props(&mut self, props: &DocProperties) -> Result<()>
Set the document core properties (docProps/core.xml).
Sourcepub fn get_doc_props(&self) -> Result<DocProperties>
pub fn get_doc_props(&self) -> Result<DocProperties>
Get the document core properties.
Sourcepub fn set_custom_props(&mut self, prop: &CustomProperty) -> Result<()>
pub fn set_custom_props(&mut self, prop: &CustomProperty) -> Result<()>
Set a custom document property by name and value. A property with a
None value is deleted.
Sourcepub fn get_custom_props(&self) -> Result<Vec<CustomProperty>>
pub fn get_custom_props(&self) -> Result<Vec<CustomProperty>>
Get all custom document properties.
Sourcepub fn delete_custom_props(&mut self, name: &str) -> Result<()>
pub fn delete_custom_props(&mut self, name: &str) -> Result<()>
Delete a custom document property by name.
Source§impl File
impl File
Sourcepub fn new_with_options(opts: Options) -> Self
pub fn new_with_options(opts: Options) -> Self
Create a new blank workbook with options.
Sourcepub fn open_file(path: &str, opts: Options) -> Result<Self>
pub fn open_file(path: &str, opts: Options) -> Result<Self>
Open a workbook from the filesystem.
Sourcepub fn open_reader<R: Read + Seek>(
reader: R,
_size: u64,
opts: Options,
) -> Result<Self>
pub fn open_reader<R: Read + Seek>( reader: R, _size: u64, opts: Options, ) -> Result<Self>
Open a workbook from a readable/seekable source.
Sourcepub fn charset_transcoder<F>(&self, transcoder: F) -> &Self
pub fn charset_transcoder<F>(&self, transcoder: F) -> &Self
Set a user-defined charset transcoder for non-UTF-8 XML package parts.
Mirrors Go File.CharsetTranscoder.
Sourcepub fn set_zip_writer<F>(&self, factory: F) -> &Self
pub fn set_zip_writer<F>(&self, factory: F) -> &Self
Set a user-defined ZIP writer factory for saving the workbook.
Mirrors Go File.SetZipWriter. The factory receives a writer that also
implements Seek because the underlying zip::ZipWriter needs to seek
back to write the central directory.
Sourcepub fn read_xml(&self, name: &str) -> Vec<u8> ⓘ
pub fn read_xml(&self, name: &str) -> Vec<u8> ⓘ
Read XML content as bytes from the in-memory package.
Sourcepub fn read_bytes(&self, name: &str) -> Vec<u8> ⓘ
pub fn read_bytes(&self, name: &str) -> Vec<u8> ⓘ
Read file content as bytes, falling back to temporary files.
Sourcepub fn save_file_list(&self, name: &str, content: &[u8])
pub fn save_file_list(&self, name: &str, content: &[u8])
Update or add a package part, prefixing the standard XML header.
Sourcepub fn content_types_reader(&self) -> Result<XlsxTypes>
pub fn content_types_reader(&self) -> Result<XlsxTypes>
Lazy reader for [Content_Types].xml.
Sourcepub fn styles_reader(&self) -> Result<XlsxStyleSheet>
pub fn styles_reader(&self) -> Result<XlsxStyleSheet>
Lazy reader for xl/styles.xml.
Sourcepub fn workbook_reader(&self) -> Result<XlsxWorkbook>
pub fn workbook_reader(&self) -> Result<XlsxWorkbook>
Lazy reader for xl/workbook.xml.
Sourcepub fn theme_reader(&self) -> Result<Option<DecodeTheme>>
pub fn theme_reader(&self) -> Result<Option<DecodeTheme>>
Lazy reader for the theme part.
Lazy reader for the shared string table.
Sourcepub fn rels_reader(&self, path: &str) -> Result<Option<XlsxRelationships>>
pub fn rels_reader(&self, path: &str) -> Result<Option<XlsxRelationships>>
Lazy reader for relationship parts.
Sourcepub fn metadata_reader(&self) -> Result<XlsxMetadata>
pub fn metadata_reader(&self) -> Result<XlsxMetadata>
Lazy reader for xl/metadata.xml.
Sourcepub fn rich_value_reader(&self) -> Result<XlsxRichValueData>
pub fn rich_value_reader(&self) -> Result<XlsxRichValueData>
Lazy reader for xl/richData/rdrichvalue.xml.
Sourcepub fn rich_value_rel_reader(&self) -> Result<XlsxRichValueRels>
pub fn rich_value_rel_reader(&self) -> Result<XlsxRichValueRels>
Lazy reader for xl/richData/richValueRel.xml.
Sourcepub fn rich_value_structures_reader(&self) -> Result<XlsxRichValueStructures>
pub fn rich_value_structures_reader(&self) -> Result<XlsxRichValueStructures>
Lazy reader for xl/richData/rdrichvaluestructure.xml.
Sourcepub fn rich_value_web_image_reader(
&self,
) -> Result<XlsxWebImagesSupportingRichData>
pub fn rich_value_web_image_reader( &self, ) -> Result<XlsxWebImagesSupportingRichData>
Lazy reader for xl/richData/rdRichValueWebImage.xml.
Sourcepub fn set_rels(
&self,
r_id: &str,
rel_path: &str,
rel_type: &str,
target: &str,
target_mode: &str,
) -> i32
pub fn set_rels( &self, r_id: &str, rel_path: &str, rel_type: &str, target: &str, target_mode: &str, ) -> i32
Set an existing relationship entry, or add a new one if r_id is empty.
Sourcepub fn add_rels(
&self,
rel_path: &str,
rel_type: &str,
target: &str,
target_mode: &str,
) -> i32
pub fn add_rels( &self, rel_path: &str, rel_type: &str, target: &str, target_mode: &str, ) -> i32
Add a relationship to a relationship part.
Sourcepub fn get_workbook_path(&self) -> String
pub fn get_workbook_path(&self) -> String
Get the workbook XML path from the root relationships.
Sourcepub fn get_workbook_rels_path(&self) -> String
pub fn get_workbook_rels_path(&self) -> String
Get the workbook relationships path.
Sourcepub fn get_worksheet_path(&self, rel_target: &str) -> String
pub fn get_worksheet_path(&self, rel_target: &str) -> String
Convert a relative relationship target to an absolute package path.
Sourcepub fn get_sheet_xml_path(&self, sheet: &str) -> Option<String>
pub fn get_sheet_xml_path(&self, sheet: &str) -> Option<String>
Get the XML path for a worksheet by name.
Sourcepub fn work_sheet_reader(&self, sheet: &str) -> Result<XlsxWorksheet>
pub fn work_sheet_reader(&self, sheet: &str) -> Result<XlsxWorksheet>
Deserialize and return a worksheet by name.
Sourcepub fn write_to_buffer(&self) -> Result<Vec<u8>>
pub fn write_to_buffer(&self) -> Result<Vec<u8>>
Serialize the workbook to an in-memory byte buffer.
Sourcepub fn add_name_spaces(&self, path: &str, ns: &str)
pub fn add_name_spaces(&self, path: &str, ns: &str)
Register a namespace attribute for the given XML part so that it is written back when the part is serialized.
ns is the namespace URI; the prefix is looked up from the project’s
namespace dictionary. For known extension namespaces the mc:Ignorable
attribute is also updated so Excel compatibility markup stays valid.
Sourcepub fn get_sheet_id(&self, sheet: &str) -> i32
pub fn get_sheet_id(&self, sheet: &str) -> i32
Return the sheet ID (1-based) for a worksheet name.
Sourcepub fn expand_3d_sheet_range(
&self,
sheet1: &str,
sheet2: &str,
) -> Result<Vec<String>>
pub fn expand_3d_sheet_range( &self, sheet1: &str, sheet2: &str, ) -> Result<Vec<String>>
Expand a 3D sheet range (e.g. Sheet1:Sheet3) into the ordered list of
worksheet names between the two sheets inclusive.
Sourcepub fn clear_calc_cache(&self)
pub fn clear_calc_cache(&self)
Clear the in-memory calc cache so the chain is rewritten on save.
Sourcepub fn add_content_type_part(&self, id: i32, part: &str) -> Result<()>
pub fn add_content_type_part(&self, id: i32, part: &str) -> Result<()>
Add a content type override for a numbered part.
Sourcepub fn remove_content_types_part(
&self,
content_type: &str,
part_name: &str,
) -> Result<()>
pub fn remove_content_types_part( &self, content_type: &str, part_name: &str, ) -> Result<()>
Remove a content type override by content type and part name prefix.
Sourcepub fn get_sheet_relationships_target_by_id(
&self,
sheet: &str,
r_id: &str,
) -> String
pub fn get_sheet_relationships_target_by_id( &self, sheet: &str, r_id: &str, ) -> String
Return the relationship target for a worksheet relationship by rId.
Sourcepub fn add_sheet_legacy_drawing(&self, sheet: &str, r_id: i32) -> Result<()>
pub fn add_sheet_legacy_drawing(&self, sheet: &str, r_id: i32) -> Result<()>
Add a legacy drawing reference to a worksheet.
Sourcepub fn add_sheet_legacy_drawing_hf(&self, sheet: &str, r_id: i32) -> Result<()>
pub fn add_sheet_legacy_drawing_hf(&self, sheet: &str, r_id: i32) -> Result<()>
Add a legacy header/footer drawing reference to a worksheet.
Sourcepub fn count_comments(&self) -> i32
pub fn count_comments(&self) -> i32
Count existing comments parts in the package.
Sourcepub fn count_vml_drawing(&self) -> i32
pub fn count_vml_drawing(&self) -> i32
Count existing VML drawing parts in the package.
Sourcepub fn comments_reader(&self, path: &str) -> Result<Option<XlsxComments>>
pub fn comments_reader(&self, path: &str) -> Result<Option<XlsxComments>>
Lazy reader for comments parts.
Sourcepub fn vml_drawing_reader(&self, path: &str) -> Result<Option<VmlDrawing>>
pub fn vml_drawing_reader(&self, path: &str) -> Result<Option<VmlDrawing>>
Lazy reader for VML drawing parts.
Sourcepub fn delete_sheet_relationships(&self, sheet: &str, r_id: &str)
pub fn delete_sheet_relationships(&self, sheet: &str, r_id: &str)
Delete a worksheet relationship by rId.
Sourcepub fn delete_workbook_rels(
&self,
rel_type: &str,
target: &str,
) -> Result<String>
pub fn delete_workbook_rels( &self, rel_type: &str, target: &str, ) -> Result<String>
Delete a workbook relationship by type and target, returning its rId.
Sourcepub fn add_sheet_drawing(&self, sheet: &str, r_id: i32) -> Result<()>
pub fn add_sheet_drawing(&self, sheet: &str, r_id: i32) -> Result<()>
Add a drawing relationship reference to a worksheet.
Sourcepub fn count_tables(&self) -> i32
pub fn count_tables(&self) -> i32
Count existing table parts in the package.
Sourcepub fn count_drawings(&self) -> i32
pub fn count_drawings(&self) -> i32
Count existing drawing parts in the package.
Sourcepub fn count_charts(&self) -> i32
pub fn count_charts(&self) -> i32
Count existing chart parts in the package.
Sourcepub fn count_pivot_tables(&self) -> i32
pub fn count_pivot_tables(&self) -> i32
Count existing pivot table parts in the package.
Sourcepub fn count_pivot_cache(&self) -> i32
pub fn count_pivot_cache(&self) -> i32
Count existing pivot cache parts in the package.
Sourcepub fn count_slicers(&self) -> i32
pub fn count_slicers(&self) -> i32
Count existing slicer parts in the package.
Sourcepub fn count_slicer_cache(&self) -> i32
pub fn count_slicer_cache(&self) -> i32
Count existing slicer cache parts in the package.
Sourcepub fn get_defined_names(&self) -> Result<Vec<DefinedName>>
pub fn get_defined_names(&self) -> Result<Vec<DefinedName>>
Return all defined names in the workbook.
Sourcepub fn set_defined_name(&self, dn: &DefinedName) -> Result<()>
pub fn set_defined_name(&self, dn: &DefinedName) -> Result<()>
Add a defined name.
Sourcepub fn delete_defined_name(&self, dn: &DefinedName) -> Result<()>
pub fn delete_defined_name(&self, dn: &DefinedName) -> Result<()>
Delete a defined name.
Sourcepub fn get_defined_name_ref_to(&self, name: &str, current_sheet: &str) -> String
pub fn get_defined_name_ref_to(&self, name: &str, current_sheet: &str) -> String
Return the reference a defined name resolves to.
Sourcepub fn get_defined_name(&self) -> Result<Vec<DefinedName>>
pub fn get_defined_name(&self) -> Result<Vec<DefinedName>>
Alias for Self::get_defined_names, matching the Go GetDefinedName
API surface.
Source§impl File
impl File
Sourcepub fn write<W: Write>(&self, writer: W) -> Result<()>
pub fn write<W: Write>(&self, writer: W) -> Result<()>
Write the workbook to any writer. Alias for Self::write_to.
Sourcepub fn save_with_options(&mut self, opts: Options) -> Result<()>
pub fn save_with_options(&mut self, opts: Options) -> Result<()>
Save to the original path, overriding the stored options.
Sourcepub fn save_as_with_options(&mut self, path: &str, opts: Options) -> Result<()>
pub fn save_as_with_options(&mut self, path: &str, opts: Options) -> Result<()>
Save the workbook to the given path, overriding the stored options.
Sourcepub fn update_linked_value(&self) -> Result<()>
pub fn update_linked_value(&self) -> Result<()>
Clear cached linked values for formula cells so Excel recalculates them on open.
Equivalent to Go UpdateLinkedValue.
Sourcepub fn read_zip_reader<R: Read + Seek>(
&self,
archive: &mut ZipArchive<R>,
) -> Result<(HashMap<String, Vec<u8>>, i32)>
pub fn read_zip_reader<R: Read + Seek>( &self, archive: &mut ZipArchive<R>, ) -> Result<(HashMap<String, Vec<u8>>, i32)>
Extract spreadsheet package parts from a ZipArchive.
Equivalent to Go ReadZipReader.
Sourcepub fn set_workbook_props(&self, opts: &WorkbookPropsOptions) -> Result<()>
pub fn set_workbook_props(&self, opts: &WorkbookPropsOptions) -> Result<()>
Set workbook properties.
Sourcepub fn get_workbook_props(&self) -> Result<WorkbookPropsOptions>
pub fn get_workbook_props(&self) -> Result<WorkbookPropsOptions>
Get workbook properties.
Sourcepub fn set_calc_props(&self, opts: &CalcPropsOptions) -> Result<()>
pub fn set_calc_props(&self, opts: &CalcPropsOptions) -> Result<()>
Set calculation properties.
Sourcepub fn get_calc_props(&self) -> Result<CalcPropsOptions>
pub fn get_calc_props(&self) -> Result<CalcPropsOptions>
Get calculation properties.
Sourcepub fn protect_workbook(&self, opts: &WorkbookProtectionOptions) -> Result<()>
pub fn protect_workbook(&self, opts: &WorkbookProtectionOptions) -> Result<()>
Protect the workbook with optional password and lock settings.
Sourcepub fn unprotect_workbook(&self, password: Option<&str>) -> Result<()>
pub fn unprotect_workbook(&self, password: Option<&str>) -> Result<()>
Remove workbook protection, optionally verifying the password first.
Sourcepub fn add_vba_project(&self, data: &[u8]) -> Result<()>
pub fn add_vba_project(&self, data: &[u8]) -> Result<()>
Add a VBA project binary to the workbook.
The data must start with the OLE compound-file identifier. A valid
vbaProject.bin can be embedded by reading it from disk and passing
the bytes to this method. The workbook should be saved with an .xlsm
or .xltm extension.
Sourcepub fn set_content_type_part_project_extensions(
&self,
content_type: &str,
) -> Result<()>
pub fn set_content_type_part_project_extensions( &self, content_type: &str, ) -> Result<()>
Set the workbook content type and .bin default for macro workbooks.
Source§impl File
impl File
Source§impl File
impl File
Sourcepub fn add_picture(
&mut self,
sheet: &str,
cell: &str,
path: &str,
opts: Option<&GraphicOptions>,
) -> Result<()>
pub fn add_picture( &mut self, sheet: &str, cell: &str, path: &str, opts: Option<&GraphicOptions>, ) -> Result<()>
Add a picture to a worksheet from a file path.
Sourcepub fn add_picture_from_bytes(
&mut self,
sheet: &str,
cell: &str,
pic: &Picture,
) -> Result<()>
pub fn add_picture_from_bytes( &mut self, sheet: &str, cell: &str, pic: &Picture, ) -> Result<()>
Add a picture to a worksheet from raw bytes.
Source§impl File
impl File
Sourcepub fn add_pivot_table(&self, opts: &mut PivotTableOptions) -> Result<()>
pub fn add_pivot_table(&self, opts: &mut PivotTableOptions) -> Result<()>
Add a pivot table.
Sourcepub fn get_pivot_tables(&self, sheet: &str) -> Result<Vec<PivotTableOptions>>
pub fn get_pivot_tables(&self, sheet: &str) -> Result<Vec<PivotTableOptions>>
Get pivot tables on a worksheet.
Source§impl File
impl File
Sourcepub fn set_row_height(&self, sheet: &str, row: i32, height: f64) -> Result<()>
pub fn set_row_height(&self, sheet: &str, row: i32, height: f64) -> Result<()>
Set the height of a row.
Sourcepub fn set_row_visible(
&self,
sheet: &str,
row: i32,
visible: bool,
) -> Result<()>
pub fn set_row_visible( &self, sheet: &str, row: i32, visible: bool, ) -> Result<()>
Set the visibility of a row.
Sourcepub fn get_row_visible(&self, sheet: &str, row: i32) -> Result<bool>
pub fn get_row_visible(&self, sheet: &str, row: i32) -> Result<bool>
Get the visibility of a row.
Sourcepub fn set_row_outline_level(
&self,
sheet: &str,
row: i32,
level: u8,
) -> Result<()>
pub fn set_row_outline_level( &self, sheet: &str, row: i32, level: u8, ) -> Result<()>
Set the outline level of a row.
Sourcepub fn get_row_outline_level(&self, sheet: &str, row: i32) -> Result<u8>
pub fn get_row_outline_level(&self, sheet: &str, row: i32) -> Result<u8>
Get the outline level of a row.
Sourcepub fn insert_rows(&self, sheet: &str, row: i32, n: usize) -> Result<()>
pub fn insert_rows(&self, sheet: &str, row: i32, n: usize) -> Result<()>
Insert n rows before row.
Sourcepub fn duplicate_row_to(&self, sheet: &str, row: i32, row2: i32) -> Result<()>
pub fn duplicate_row_to(&self, sheet: &str, row: i32, row2: i32) -> Result<()>
Duplicate a row to a target position, shifting existing rows down.
Equivalent to Go DuplicateRowTo.
Sourcepub fn set_row_style(
&self,
sheet: &str,
start: i32,
end: i32,
style_id: i32,
) -> Result<()>
pub fn set_row_style( &self, sheet: &str, start: i32, end: i32, style_id: i32, ) -> Result<()>
Apply a style index to every cell in a range of rows.
This overwrites existing row and cell styles in the range; it does not
merge with existing styles. The start and end row numbers are
inclusive and will be swapped if end is less than start.
Source§impl File
impl File
Sourcepub fn get_sheet_list(&self) -> Vec<String>
pub fn get_sheet_list(&self) -> Vec<String>
Get a list of worksheet / chart / dialog sheet names.
Sourcepub fn get_sheet_name(&self, index: i32) -> Result<String>
pub fn get_sheet_name(&self, index: i32) -> Result<String>
Get the worksheet name from a 1-based sheet index.
Sourcepub fn get_sheet_index(&self, name: &str) -> Result<i32>
pub fn get_sheet_index(&self, name: &str) -> Result<i32>
Get the 1-based sheet index of a worksheet by name.
Sourcepub fn delete_sheet(&self, name: &str) -> Result<()>
pub fn delete_sheet(&self, name: &str) -> Result<()>
Delete a worksheet by name.
Sourcepub fn get_active_sheet_index(&self) -> Result<i32>
pub fn get_active_sheet_index(&self) -> Result<i32>
Get the index of the active worksheet (1-based).
Sourcepub fn set_active_sheet(&self, index: i32) -> Result<()>
pub fn set_active_sheet(&self, index: i32) -> Result<()>
Set the active worksheet by 1-based index.
Sourcepub fn set_sheet_props(
&self,
sheet: &str,
opts: &SheetPropsOptions,
) -> Result<()>
pub fn set_sheet_props( &self, sheet: &str, opts: &SheetPropsOptions, ) -> Result<()>
Set worksheet properties.
Sourcepub fn get_sheet_props(&self, sheet: &str) -> Result<SheetPropsOptions>
pub fn get_sheet_props(&self, sheet: &str) -> Result<SheetPropsOptions>
Get worksheet properties.
Sourcepub fn set_sheet_view(
&self,
sheet: &str,
view_index: i32,
opts: &SheetViewOptions,
) -> Result<()>
pub fn set_sheet_view( &self, sheet: &str, view_index: i32, opts: &SheetViewOptions, ) -> Result<()>
Set worksheet view properties on the given sheet view. The view index may be negative and counts backward from the last view.
Sourcepub fn get_sheet_view(
&self,
sheet: &str,
view_index: i32,
) -> Result<SheetViewOptions>
pub fn get_sheet_view( &self, sheet: &str, view_index: i32, ) -> Result<SheetViewOptions>
Get worksheet view properties from the given sheet view. The view index may be negative and counts backward from the last view.
Sourcepub fn set_page_layout(
&self,
sheet: &str,
opts: &PageLayoutOptions,
) -> Result<()>
pub fn set_page_layout( &self, sheet: &str, opts: &PageLayoutOptions, ) -> Result<()>
Set page layout properties.
Sourcepub fn get_page_layout(&self, sheet: &str) -> Result<PageLayoutOptions>
pub fn get_page_layout(&self, sheet: &str) -> Result<PageLayoutOptions>
Get page layout properties.
Sourcepub fn set_page_margins(
&self,
sheet: &str,
opts: &PageMarginsOptions,
) -> Result<()>
pub fn set_page_margins( &self, sheet: &str, opts: &PageMarginsOptions, ) -> Result<()>
Set page margins.
Sourcepub fn get_page_margins(&self, sheet: &str) -> Result<PageMarginsOptions>
pub fn get_page_margins(&self, sheet: &str) -> Result<PageMarginsOptions>
Get page margins.
Set header/footer text.
Get header/footer text.
Sourcepub fn set_sheet_name(&self, source: &str, target: &str) -> Result<()>
pub fn set_sheet_name(&self, source: &str, target: &str) -> Result<()>
Set the worksheet name by given source and target worksheet names.
Sourcepub fn set_sheet_background(&self, sheet: &str, picture: &str) -> Result<()>
pub fn set_sheet_background(&self, sheet: &str, picture: &str) -> Result<()>
Set background picture by given worksheet name and file path.
Sourcepub fn set_sheet_background_from_bytes(
&self,
sheet: &str,
extension: &str,
picture: &[u8],
) -> Result<()>
pub fn set_sheet_background_from_bytes( &self, sheet: &str, extension: &str, picture: &[u8], ) -> Result<()>
Set background picture by given worksheet name, extension name and image data.
Sourcepub fn move_sheet(&self, source: &str, target: &str) -> Result<()>
pub fn move_sheet(&self, source: &str, target: &str) -> Result<()>
Move a sheet to a specified position in the workbook. Indices are 1-based and the source sheet is placed before the target sheet.
Sourcepub fn copy_sheet(&self, from: i32, to: i32) -> Result<()>
pub fn copy_sheet(&self, from: i32, to: i32) -> Result<()>
Duplicate a worksheet by source and target 1-based sheet indices.
Sourcepub fn set_sheet_visible(
&self,
sheet: &str,
visible: bool,
very_hidden: Option<bool>,
) -> Result<()>
pub fn set_sheet_visible( &self, sheet: &str, visible: bool, very_hidden: Option<bool>, ) -> Result<()>
Set worksheet visible by given worksheet name.
Sourcepub fn get_sheet_visible(&self, sheet: &str) -> Result<bool>
pub fn get_sheet_visible(&self, sheet: &str) -> Result<bool>
Get worksheet visible by given worksheet name.
Sourcepub fn set_panes(&self, sheet: &str, panes: &Panes) -> Result<()>
pub fn set_panes(&self, sheet: &str, panes: &Panes) -> Result<()>
Create and remove freeze panes and split panes by given worksheet name and panes options.
Sourcepub fn get_panes(&self, sheet: &str) -> Result<Panes>
pub fn get_panes(&self, sheet: &str) -> Result<Panes>
Get freeze panes, split panes, and worksheet views by given worksheet name.
Sourcepub fn search_sheet(
&self,
sheet: &str,
value: &str,
reg: Option<bool>,
) -> Result<Vec<String>>
pub fn search_sheet( &self, sheet: &str, value: &str, reg: Option<bool>, ) -> Result<Vec<String>>
Search cell reference by given worksheet name, cell value, and regular expression.
Sourcepub fn protect_sheet(
&self,
sheet: &str,
opts: &SheetProtectionOptions,
) -> Result<()>
pub fn protect_sheet( &self, sheet: &str, opts: &SheetProtectionOptions, ) -> Result<()>
Protect worksheet to prevent accidental or deliberate changes.
Sourcepub fn unprotect_sheet(&self, sheet: &str, password: Option<&str>) -> Result<()>
pub fn unprotect_sheet(&self, sheet: &str, password: Option<&str>) -> Result<()>
Remove protection for a sheet.
Sourcepub fn get_sheet_protection(
&self,
sheet: &str,
) -> Result<SheetProtectionOptions>
pub fn get_sheet_protection( &self, sheet: &str, ) -> Result<SheetProtectionOptions>
Get worksheet protection settings by given worksheet name.
Sourcepub fn group_sheets(&self, sheets: &[String]) -> Result<()>
pub fn group_sheets(&self, sheets: &[String]) -> Result<()>
Group worksheets by given worksheet names.
Sourcepub fn ungroup_sheets(&self) -> Result<()>
pub fn ungroup_sheets(&self) -> Result<()>
Ungroup worksheets.
Sourcepub fn insert_page_break(&self, sheet: &str, cell: &str) -> Result<()>
pub fn insert_page_break(&self, sheet: &str, cell: &str) -> Result<()>
Create a page break by given worksheet name and cell reference.
Sourcepub fn remove_page_break(&self, sheet: &str, cell: &str) -> Result<()>
pub fn remove_page_break(&self, sheet: &str, cell: &str) -> Result<()>
Remove a page break by given worksheet name and cell reference.
Sourcepub fn set_sheet_dimension(&self, sheet: &str, range_ref: &str) -> Result<()>
pub fn set_sheet_dimension(&self, sheet: &str, range_ref: &str) -> Result<()>
Set or remove the used range of the worksheet by a given range reference.
Sourcepub fn get_sheet_dimension(&self, sheet: &str) -> Result<String>
pub fn get_sheet_dimension(&self, sheet: &str) -> Result<String>
Get the used range of the worksheet.
Sourcepub fn add_ignored_errors(
&self,
sheet: &str,
range_ref: &str,
ignored_errors_type: IgnoredErrorsType,
) -> Result<()>
pub fn add_ignored_errors( &self, sheet: &str, range_ref: &str, ignored_errors_type: IgnoredErrorsType, ) -> Result<()>
Ignore error for a range of cells.
Source§impl File
impl File
Sourcepub fn get_sheet_name_to_path_map(&self) -> Result<HashMap<String, String>>
pub fn get_sheet_name_to_path_map(&self) -> Result<HashMap<String, String>>
Build a map of worksheet name → XML path from the workbook and its rels.
Sourcepub fn get_sheet_map(&self) -> HashMap<i32, String>
pub fn get_sheet_map(&self) -> HashMap<i32, String>
Get worksheets, chart sheets and dialog sheets ID and name map of the workbook.
Sourcepub fn rel_id_to_sheet_id(&self, r_id: &str) -> Result<i32>
pub fn rel_id_to_sheet_id(&self, r_id: &str) -> Result<i32>
Convert a relationship id to a 0-based sheet index.
Source§impl File
impl File
Sourcepub fn add_slicer(&self, sheet: &str, opts: &SlicerOptions) -> Result<()>
pub fn add_slicer(&self, sheet: &str, opts: &SlicerOptions) -> Result<()>
AddSlicer inserts a slicer by giving the worksheet name and slicer settings.
Sourcepub fn get_slicers(&self, sheet: &str) -> Result<Vec<SlicerOptions>>
pub fn get_slicers(&self, sheet: &str) -> Result<Vec<SlicerOptions>>
GetSlicers provides all slicers in a worksheet by a given worksheet name.
Sourcepub fn delete_slicer(&self, name: &str) -> Result<()>
pub fn delete_slicer(&self, name: &str) -> Result<()>
DeleteSlicer deletes a slicer by a given slicer name.
Source§impl File
impl File
Sourcepub fn add_sparkline(&self, sheet: &str, opts: &SparklineOptions) -> Result<()>
pub fn add_sparkline(&self, sheet: &str, opts: &SparklineOptions) -> Result<()>
Add sparklines to a worksheet.
Sparklines are small charts that fit in a single cell and are used to show trends in data. Sparklines are a feature of Excel 2010 and later only.
Source§impl File
impl File
Sourcepub fn new_stream_writer(&self, sheet: &str) -> Result<StreamWriter<'_>>
pub fn new_stream_writer(&self, sheet: &str) -> Result<StreamWriter<'_>>
Create a new stream writer for the given worksheet.
Source§impl File
impl File
Sourcepub fn new_style(&self, style: &Style) -> Result<i32>
pub fn new_style(&self, style: &Style) -> Result<i32>
Create a new cell style and return its style ID.
Equivalent to Go NewStyle.
Sourcepub fn get_style(&self, style_id: i32) -> Result<Style>
pub fn get_style(&self, style_id: i32) -> Result<Style>
Get the style definition for a given style ID.
Equivalent to Go GetStyle.
Sourcepub fn get_default_font(&self) -> Result<String>
pub fn get_default_font(&self) -> Result<String>
Return the default font name in the workbook.
Equivalent to Go GetDefaultFont.
Sourcepub fn set_default_font(&self, font_name: &str) -> Result<()>
pub fn set_default_font(&self, font_name: &str) -> Result<()>
Change the default font in the workbook.
Equivalent to Go SetDefaultFont.
Sourcepub fn new_conditional_style(&self, style: &Style) -> Result<i32>
pub fn new_conditional_style(&self, style: &Style) -> Result<i32>
Create a new style for conditional formats and return its dxf ID.
Equivalent to Go NewConditionalStyle.
Sourcepub fn get_conditional_style(&self, style_id: i32) -> Result<Style>
pub fn get_conditional_style(&self, style_id: i32) -> Result<Style>
Get the conditional format style definition for a given dxf ID.
Equivalent to Go GetConditionalStyle.
Sourcepub fn set_conditional_format(
&self,
sheet: &str,
range_ref: &str,
opts: &[ConditionalFormatOptions],
) -> Result<()>
pub fn set_conditional_format( &self, sheet: &str, range_ref: &str, opts: &[ConditionalFormatOptions], ) -> Result<()>
Create conditional formatting rules for a range of cells.
Equivalent to Go SetConditionalFormat.
Sourcepub fn get_conditional_formats(
&self,
sheet: &str,
) -> Result<HashMap<String, Vec<ConditionalFormatOptions>>>
pub fn get_conditional_formats( &self, sheet: &str, ) -> Result<HashMap<String, Vec<ConditionalFormatOptions>>>
Return conditional format settings by worksheet name.
Equivalent to Go GetConditionalFormats.
Source§impl File
impl File
Sourcepub fn add_table(&self, sheet: &str, table: Option<&Table>) -> Result<()>
pub fn add_table(&self, sheet: &str, table: Option<&Table>) -> Result<()>
Add a table to a worksheet.
Sourcepub fn delete_table(&self, name: &str) -> Result<()>
pub fn delete_table(&self, name: &str) -> Result<()>
Delete a table by name.
Sourcepub fn auto_filter(
&self,
sheet: &str,
range_ref: &str,
opts: &[AutoFilterOptions],
) -> Result<()>
pub fn auto_filter( &self, sheet: &str, range_ref: &str, opts: &[AutoFilterOptions], ) -> Result<()>
Apply an AutoFilter to a worksheet range.
Source§impl File
impl File
Sourcepub fn get_comments(&self, sheet: &str) -> Result<Vec<Comment>>
pub fn get_comments(&self, sheet: &str) -> Result<Vec<Comment>>
Retrieve all comments in a worksheet.
Sourcepub fn add_comment(&self, sheet: &str, opts: Comment) -> Result<()>
pub fn add_comment(&self, sheet: &str, opts: Comment) -> Result<()>
Add a comment to a worksheet.
Sourcepub fn delete_comment(&self, sheet: &str, cell: &str) -> Result<()>
pub fn delete_comment(&self, sheet: &str, cell: &str) -> Result<()>
Delete a comment in a worksheet by cell reference.
Sourcepub fn add_form_control(&self, sheet: &str, opts: FormControl) -> Result<()>
pub fn add_form_control(&self, sheet: &str, opts: FormControl) -> Result<()>
Add a form control to a worksheet.
Sourcepub fn delete_form_control(&self, sheet: &str, cell: &str) -> Result<()>
pub fn delete_form_control(&self, sheet: &str, cell: &str) -> Result<()>
Delete a form control in a worksheet by cell reference.
Sourcepub fn get_form_controls(&self, sheet: &str) -> Result<Vec<FormControl>>
pub fn get_form_controls(&self, sheet: &str) -> Result<Vec<FormControl>>
Retrieve all form controls in a worksheet.
Add an image that can be referenced from the worksheet header/footer.
Trait Implementations§
Source§impl ExcelizeCore for File
impl ExcelizeCore for File
Source§fn check_open_reader_options(&self) -> Result<()>
fn check_open_reader_options(&self) -> Result<()>
Source§fn work_sheet_reader(&self, sheet: &str) -> Result<XlsxWorksheet>
fn work_sheet_reader(&self, sheet: &str) -> Result<XlsxWorksheet>
Source§fn update_linked_value(&self) -> Result<()>
fn update_linked_value(&self) -> Result<()>
Source§fn add_vba_project(&self, data: &[u8]) -> Result<()>
fn add_vba_project(&self, data: &[u8]) -> Result<()>
Source§fn set_content_type_part_project_extensions(
&self,
content_type: &str,
) -> Result<()>
fn set_content_type_part_project_extensions( &self, content_type: &str, ) -> Result<()>
.bin default for macro workbooks.Source§fn set_workbook_props(&self, opts: &WorkbookPropsOptions) -> Result<()>
fn set_workbook_props(&self, opts: &WorkbookPropsOptions) -> Result<()>
Source§fn get_workbook_props(&self) -> Result<WorkbookPropsOptions>
fn get_workbook_props(&self) -> Result<WorkbookPropsOptions>
Source§fn set_calc_props(&self, opts: &CalcPropsOptions) -> Result<()>
fn set_calc_props(&self, opts: &CalcPropsOptions) -> Result<()>
Source§fn get_calc_props(&self) -> Result<CalcPropsOptions>
fn get_calc_props(&self) -> Result<CalcPropsOptions>
Source§fn protect_workbook(&self, opts: &WorkbookProtectionOptions) -> Result<()>
fn protect_workbook(&self, opts: &WorkbookProtectionOptions) -> Result<()>
Auto Trait Implementations§
impl !Freeze for File
impl !RefUnwindSafe for File
impl !Sync for File
impl Send for File
impl Unpin for File
impl UnsafeUnpin for File
impl UnwindSafe for File
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.