Workbook
Overview
Workbook is a class in Aspose.Cells FOSS for C++.
Represents the root spreadsheet object used to create, load, modify, and save an XLSX workbook.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Workbook | Workbook | Read |
Methods
| Signature | Description |
|---|---|
Workbook() → Workbook | Initializes a new workbook with one default worksheet. |
Save(fileName: std::string_view) | Saves the workbook to an XLSX file using default save options. |
Save(fileName: std::string_view, format: SaveFormat) | Saves the workbook to an XLSX file using default save options. |
Save(fileName: std::string_view, options: SaveOptions) | Saves the workbook to an XLSX file using default save options. |
Save(stream: std::vector<std::uint8_t>, format: SaveFormat) | Saves the workbook to an XLSX file using default save options. |
Save(stream: std::vector<std::uint8_t>, options: SaveOptions) | Saves the workbook to an XLSX file using default save options. |
EnsureUniqueSheetName(sheetName: std::string_view, currentSheet: std::optional<std::reference_wrapper<const Core::WorksheetModel>>) | Ensures no other worksheet in the workbook shares the given name. Throws CellsException when a duplicate is found. |
EnsureValidDefinedNameScope(localSheetIndex: std::optional<int>) | Validates that the local sheet index is absent (global scope) or within the valid worksheet range. Throws CellsException otherwise. |
EnsureUniqueDefinedName(currentDefinedName: Core::DefinedNameModel, name: std::string_view, localSheetIndex: std::optional<int>) | Ensures no other defined name in the workbook shares the given name and scope. Throws CellsException when a duplicate is found. |
Dispose() | Releases resources associated with the workbook instance. |