Workbook
Workbook
Tổng quan
Workbook là một struct trong Aspose.Cells FOSS cho Rust. Kế thừa từ: Debug, Clone, PartialEq, và 1 nữa.
Đại diện cho đối tượng bảng tính gốc được sử dụng để tạo, tải, sửa đổi và lưu một workbook XLSX.
Struct này khai báo 58 phương thức cho các đối tượng Workbook trong các chương trình Rust. Các phương thức có sẵn bao gồm: 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, và 46 phương thức bổ sung. Các thành viên công khai có thể được truy cập bởi bất kỳ ứng dụng Rust nào sau khi cài đặt gói Aspose.Cells FOSS cho Rust.
Phương thức
| Chữ ký | Mô tả |
|---|---|
default() → Self | Gọi mặc định trên thể hiện Workbook này. |
new() → Self | Khởi tạo một thể hiện mới. |
add_worksheet(name: impl Into<String>) → Result<usize, CellsError> | Thêm một mục. |
worksheet(name: &str) → Result<&Worksheet, CellsError> | Lấy worksheet có tên được chỉ định. |
worksheet_or_cells_exception(name: &str) → Result<&Worksheet, CellsException> | Lấy trang tính có tên được chỉ định, trả về một CellsException khi thất bại. |
worksheet_at(index: usize) → Result<&Worksheet, CellsError> | Lấy worksheet tại chỉ mục bắt đầu từ 0 được chỉ định. |
worksheet_at_or_cells_exception(index: usize) → Result<&Worksheet, CellsException> | Lấy trang tính tại chỉ mục bắt đầu từ 0 được chỉ định, trả về một CellsException khi thất bại. |
get_worksheets() → Worksheets<'_> | Lấy các worksheet theo thứ tự của workbook. |
get_worksheets_mut() → WorksheetsMut<'_> | Lấy giá trị liên quan. |
settings() → WorkbookSettings | Lấy các cài đặt ở mức sách làm việc như hệ thống ngày và ngôn ngữ hiển thị. |
get_settings() → WorkbookSettings | Lấy các cài đặt ở mức sổ làm việc như hệ thống ngày và văn hoá hiển thị. |
set_settings(settings: WorkbookSettings) | Đặt các cài đặt ở mức sổ làm việc như hệ thống ngày và văn hoá hiển thị. |
protect() | Bảo vệ đối tượng hiện tại. |
unprotect() | Gỡ bỏ bảo vệ khỏi đối tượng hiện tại. |
protection() → WorkbookProtection | Lấy giá trị liên quan. |
get_protection() → WorkbookProtection | Lấy giá trị liên quan. |
protection_mut() → &mut WorkbookProtection | Lấy giá trị liên quan. |
get_protection_mut() → &mut WorkbookProtection | Lấy giá trị tương ứng. |
is_protected() → bool | Trả về liệu có được bảo vệ hay không. |
properties() → &WorkbookProperties | Lấy siêu dữ liệu sổ làm việc và cài đặt hiển thị được công khai bởi API công cộng được hỗ trợ. |
get_properties() → &WorkbookProperties | Lấy siêu dữ liệu workbook và cài đặt hiển thị được công khai bởi API được hỗ trợ. |
get_properties_mut() → &mut WorkbookProperties | Lấy giá trị liên quan. |
document_properties() → &DocumentProperties | Lấy giao diện thuộc tính tài liệu cho siêu dữ liệu lõi và mở rộng. |
get_document_properties() → &DocumentProperties | Lấy giao diện thuộc tính tài liệu cho siêu dữ liệu lõi và mở rộng. |
get_document_properties_mut() → &mut DocumentProperties | Lấy giá trị liên quan. |
defined_names() → DefinedNameCollection<'_> | Lấy bộ sưu tập các tên được định nghĩa trong workbook. |
get_defined_names() → DefinedNameCollection<'_> | Lấy bộ sưu tập các tên được định nghĩa trong workbook. |
load_diagnostics() → &LoadDiagnostics | Lấy thông tin chẩn đoán được thu thập trong khi tải sổ làm việc hiện tại. |
get_load_diagnostics() → &LoadDiagnostics | Lấy thông tin chẩn đoán được thu thập trong khi tải sổ làm việc hiện tại. |
load_xlsx(path: impl AsRef<Path>) → Result<Self, CellsError> | Tải một sổ làm việc. |
open(path: impl AsRef<Path>) → Result<Self, CellsError> | Mở một workbook hiện có. |
open_with_options(path: impl AsRef<Path>, options: &LoadOptions) → Result<Self, CellsError> | Mở một workbook hiện có. |
load_xlsx_with_options(path: impl AsRef<Path>, options: &LoadOptions) → Result<Self, CellsError> | Tải một workbook. |
load_xlsx_from_stream(stream: R) → Result<Self, CellsError> | Tải một workbook hiện có từ luồng sử dụng các tùy chọn tải mặc định. |
open_from_stream(stream: R) → Result<Self, CellsError> | Mở một workbook hiện có từ luồng sử dụng các tùy chọn tải mặc định. |
open_from_stream_with_options(stream: R, options: &LoadOptions) → Result<Self, CellsError> | Mở một workbook hiện có từ luồng bằng cách sử dụng các tùy chọn tải cụ thể. |
load_xlsx_from_stream_or_workbook_load_exception(stream: R) → Result<Self, WorkbookLoadException> | Tải một workbook hiện có từ luồng bằng cách sử dụng các tùy chọn tải mặc định. |
load_xlsx_from_stream_with_options(stream: R, options: &LoadOptions) → Result<Self, CellsError> | Tải một workbook hiện có từ luồng bằng cách sử dụng các tùy chọn tải cụ thể. |
load_xlsx_from_bytes(bytes: &[u8]) → Result<Self, CellsError> | Tải một workbook. |
load_xlsx_from_bytes_or_workbook_load_exception(bytes: &[u8]) → Result<Self, WorkbookLoadException> | Tải một workbook. |
load_xlsx_from_bytes_with_options(bytes: &[u8], options: &LoadOptions) → Result<Self, CellsError> | Tải một workbook. |
save_xlsx(path: impl AsRef<Path>) → Result<(), CellsError> | Lưu workbook. |
save(path: impl AsRef<Path>) → Result<(), CellsError> | Lưu workbook vào stream bằng cách sử dụng các tùy chọn lưu rõ ràng. |
save_with_format(path: impl AsRef<Path>, format: SaveFormat) → Result<(), CellsError> | Lưu workbook. |
save_with_options(path: impl AsRef<Path>, options: &SaveOptions) → Result<(), CellsError> | Lưu workbook. |
save_xlsx_with_format(path: impl AsRef<Path>, format: SaveFormat) → Result<(), CellsError> | Lưu workbook. |
save_xlsx_with_options(path: impl AsRef<Path>, options: &SaveOptions) → Result<(), CellsError> | Lưu workbook. |
save_xlsx_to_stream(stream: W) → Result<(), CellsError> | Lưu sổ làm việc vào một luồng bằng cách sử dụng các tùy chọn lưu mặc định. |
save_to_stream_with_format(stream: W, format: SaveFormat) → Result<(), CellsError> | Lưu sổ làm việc vào một luồng bằng cách sử dụng định dạng lưu được chỉ định. |
save_to_stream_with_options(stream: W, options: &SaveOptions) → Result<(), CellsError> | Lưu sổ làm việc vào một luồng bằng cách sử dụng các tùy chọn lưu rõ ràng. |
save_xlsx_to_stream_or_workbook_save_exception(stream: W) → Result<(), WorkbookSaveException> | Lưu sổ làm việc vào một luồng và bao bọc các lỗi trong WorkbookSaveException. |
save_xlsx_to_stream_with_format(stream: W, format: SaveFormat) → Result<(), CellsError> | Lưu workbook vào một luồng bằng cách sử dụng định dạng lưu được chỉ định. |
save_xlsx_to_stream_with_options(stream: W, options: &SaveOptions) → Result<(), CellsError> | Lưu workbook vào một luồng bằng cách sử dụng các tùy chọn lưu rõ ràng. |
save_xlsx_to_bytes() → Result<Vec<u8>, CellsError> | Lưu workbook. |
save_xlsx_to_bytes_or_workbook_save_exception() → Result<Vec<u8>, WorkbookSaveException> | Lưu workbook. |
save_xlsx_to_bytes_with_format(format: SaveFormat) → Result<Vec<u8>, CellsError> | Lưu sổ làm việc. |
save_xlsx_to_bytes_with_options(options: &SaveOptions) → Result<Vec<u8>, CellsError> | Lưu workbook. |
dispose() | Giải phóng các tài nguyên liên quan đến thể hiện workbook. |