Features Overview
Features Overview
This page maps the feature surface of Aspose.Cells FOSS for Rust. Each area links the entry-point types you will meet in the API Reference.
Workbook Lifecycle
Workbook is the root object: Workbook::new creates an empty workbook,
Workbook::load_xlsx opens an existing file, and save, save_xlsx, or
save_with_format write XLSX output governed by the SaveFormat enum.
let mut workbook = Workbook::new();
workbook.save("report.xlsx")?;
let reloaded = Workbook::load_xlsx("report.xlsx")?;Cells, Values, and Formulas
Cell collections come from get_cells / get_cells_mut on a worksheet. Typed
setters (put_value_string, put_value_i32, put_value_bool,
put_value_decimal, put_value_date_time) avoid string conversions, and
put_formula_with_cached_value stores formulas together with their cached
results:
cells.get("F1")?.put_value_i32(10)?;
cells.get("G1")?
.put_formula_with_cached_value("=F1*2", CellValue::Number(20.0))?;Charts
Charts anchor to cell ranges through a sheet’s chart collection with
ChartType variants such as Column and Line; anchors and types can be
read back from loaded workbooks via Chart and ChartCollection.
Styling and Layout
CellStyle combines Font, Fill, and Borders; StyleFlag selects which
aspects apply. NumberFormat renders values, PageSetup controls
PaperSizeType and PageOrientationType, and FreezePane pins header rows.
Data Quality and Structure
Validation (with OperatorType), FormatCondition conditional formatting,
AutoFilter filtering, ListObject structured tables with TableStyleType,
DefinedName named ranges, and WorkbookProtection / WorksheetProtection.
Defensive Loading
LoadOptions exposes try_repair_package and try_repair_xml flags;
LoadDiagnostics reports issues found while loading. Errors across the API
surface use Result with CellsError.
Tips and Best Practices
- Scope
get_worksheets_mut/get_cells_mutborrows in a block so the workbook can be saved afterwards. - Prefer typed setters over formatting values into strings.
- Always supply a cached value with formulas so files open with correct results before recalculation.
- Use
LoadOptionsrepair flags when ingesting third-party files.
API Reference Summary
| Class | Description |
|---|---|
Workbook | Root object: create, load, and save XLSX workbooks |
Worksheet | A single sheet and its cells, charts, and settings |
CellMut | Mutable cell: typed value and formula setters |
CellStyle | Cell formatting with font, fill, and borders |
ChartType | Chart type selection when adding charts |
Validation | Data validation rules |
AutoFilter | Range filtering |
LoadOptions | Loading behavior and repair flags |
CellsError | Error type returned across the API |