Workbook

Overview

Workbook is a struct in Aspose.Cells FOSS for Rust. Inherits from: Debug, Clone, PartialEq, and 1 more.

Represents the root spreadsheet object used to create, load, modify, and save an XLSX workbook.

This struct declares 58 methods for Workbook objects in Rust programs. Available methods include: add_worksheet, default, defined_names, dispose, document_properties, get_defined_names, get_document_properties, get_document_properties_mut, get_load_diagnostics, get_properties, get_properties_mut, get_protection, and 46 additional methods. Public members are accessible to any Rust application after installing the Aspose.Cells FOSS for Rust package.

Methods

SignatureDescription
default() → SelfCalls default on this Workbook instance.
new() → SelfInitializes a new instance.
add_worksheet(name: impl Into<String>) → Result<usize, CellsError>Adds an item.
worksheet(name: &str) → Result<&Worksheet, CellsError>Gets the worksheet with the specified name.
worksheet_or_cells_exception(name: &str) → Result<&Worksheet, CellsException>Gets the worksheet with the specified name, returning a CellsException on failure.
worksheet_at(index: usize) → Result<&Worksheet, CellsError>Gets the worksheet at the specified zero-based index.
worksheet_at_or_cells_exception(index: usize) → Result<&Worksheet, CellsException>Gets the worksheet at the specified zero-based index, returning a CellsException on failure.
get_worksheets() → Worksheets<'_>Gets the worksheets in workbook order.
get_worksheets_mut() → WorksheetsMut<'_>Gets the associated value.
settings() → WorkbookSettingsGets workbook-level settings such as the date system and display culture.
get_settings() → WorkbookSettingsGets workbook-level settings such as the date system and display culture.
set_settings(settings: WorkbookSettings)Sets workbook-level settings such as the date system and display culture.
protect()Protects the current object.
unprotect()Removes protection from the current object.
protection() → WorkbookProtectionGets the associated value.
get_protection() → WorkbookProtectionGets the associated value.
protection_mut() → &mut WorkbookProtectionGets the associated value.
get_protection_mut() → &mut WorkbookProtectionGets the associated value.
is_protected() → boolReturns whether protected.
properties() → &WorkbookPropertiesGets workbook metadata and view settings exposed by the supported public API.
get_properties() → &WorkbookPropertiesGets workbook metadata and view settings exposed by the supported public API.
get_properties_mut() → &mut WorkbookPropertiesGets the associated value.
document_properties() → &DocumentPropertiesGets the document properties facade for core and extended metadata.
get_document_properties() → &DocumentPropertiesGets the document properties facade for core and extended metadata.
get_document_properties_mut() → &mut DocumentPropertiesGets the associated value.
defined_names() → DefinedNameCollection<'_>Gets the workbook-defined names collection.
get_defined_names() → DefinedNameCollection<'_>Gets the workbook-defined names collection.
load_diagnostics() → &LoadDiagnosticsGets diagnostics collected while loading the current workbook.
get_load_diagnostics() → &LoadDiagnosticsGets diagnostics collected while loading the current workbook.
load_xlsx(path: impl AsRef<Path>) → Result<Self, CellsError>Loads a workbook.
open(path: impl AsRef<Path>) → Result<Self, CellsError>Opens an existing workbook.
open_with_options(path: impl AsRef<Path>, options: &LoadOptions) → Result<Self, CellsError>Opens an existing workbook.
load_xlsx_with_options(path: impl AsRef<Path>, options: &LoadOptions) → Result<Self, CellsError>Loads a workbook.
load_xlsx_from_stream(stream: R) → Result<Self, CellsError>Loads an existing workbook from a stream using default load options.
open_from_stream(stream: R) → Result<Self, CellsError>Opens an existing workbook from a stream using default load options.
open_from_stream_with_options(stream: R, options: &LoadOptions) → Result<Self, CellsError>Opens an existing workbook from a stream using explicit load options.
load_xlsx_from_stream_or_workbook_load_exception(stream: R) → Result<Self, WorkbookLoadException>Loads an existing workbook from a stream using default load options.
load_xlsx_from_stream_with_options(stream: R, options: &LoadOptions) → Result<Self, CellsError>Loads an existing workbook from a stream using explicit load options.
load_xlsx_from_bytes(bytes: &[u8]) → Result<Self, CellsError>Loads a workbook.
load_xlsx_from_bytes_or_workbook_load_exception(bytes: &[u8]) → Result<Self, WorkbookLoadException>Loads a workbook.
load_xlsx_from_bytes_with_options(bytes: &[u8], options: &LoadOptions) → Result<Self, CellsError>Loads a workbook.
save_xlsx(path: impl AsRef<Path>) → Result<(), CellsError>Saves the workbook.
save(path: impl AsRef<Path>) → Result<(), CellsError>Saves the workbook to a stream using explicit save options.
save_with_format(path: impl AsRef<Path>, format: SaveFormat) → Result<(), CellsError>Saves the workbook.
save_with_options(path: impl AsRef<Path>, options: &SaveOptions) → Result<(), CellsError>Saves the workbook.
save_xlsx_with_format(path: impl AsRef<Path>, format: SaveFormat) → Result<(), CellsError>Saves the workbook.
save_xlsx_with_options(path: impl AsRef<Path>, options: &SaveOptions) → Result<(), CellsError>Saves the workbook.
save_xlsx_to_stream(stream: W) → Result<(), CellsError>Saves the workbook to a stream using default save options.
save_to_stream_with_format(stream: W, format: SaveFormat) → Result<(), CellsError>Saves the workbook to a stream using the specified save format.
save_to_stream_with_options(stream: W, options: &SaveOptions) → Result<(), CellsError>Saves the workbook to a stream using explicit save options.
save_xlsx_to_stream_or_workbook_save_exception(stream: W) → Result<(), WorkbookSaveException>Saves the workbook to a stream and wraps failures in WorkbookSaveException.
save_xlsx_to_stream_with_format(stream: W, format: SaveFormat) → Result<(), CellsError>Saves the workbook to a stream using the specified save format.
save_xlsx_to_stream_with_options(stream: W, options: &SaveOptions) → Result<(), CellsError>Saves the workbook to a stream using explicit save options.
save_xlsx_to_bytes() → Result<Vec<u8>, CellsError>Saves the workbook.
save_xlsx_to_bytes_or_workbook_save_exception() → Result<Vec<u8>, WorkbookSaveException>Saves the workbook.
save_xlsx_to_bytes_with_format(format: SaveFormat) → Result<Vec<u8>, CellsError>Saves the workbook.
save_xlsx_to_bytes_with_options(options: &SaveOptions) → Result<Vec<u8>, CellsError>Saves the workbook.
dispose()Releases resources associated with the workbook instance.

See Also

 English