Frequently Asked Questions
Licensing & Open Source
What license does Aspose.Cells FOSS for Rust use?
The crate is released under the MIT License. The full text ships in the
repository as LICENSE.txt.
Can I use it in commercial products?
Yes. The MIT License permits commercial use, modification, and redistribution. The only requirement is preserving the copyright and license notice in copies or substantial portions of the software.
Installation & Requirements
How do I install the crate?
Add aspose-cells-foss-rust to your Cargo.toml as a git dependency — the
crate is not yet published on crates.io:
# Cargo.toml
[dependencies]
aspose-cells-foss-rust = { git = "https://github.com/aspose-cells-foss/Aspose.Cells-FOSS-for-Rust" }See the installation guide for a step-by-step walkthrough.
Which Rust versions are supported?
The crate targets Rust edition 2021.
Does it require Microsoft Office or native libraries?
No. The library reads and writes the XLSX package format directly — no Microsoft Office installation, COM automation, or external runtime is involved.
Format Support
Which formats can be read and written?
XLSX is the supported format in the current release: full round-trip read and
write. Loading goes through Workbook::load_xlsx (the LoadFormat enum
covers Auto and Xlsx), and saving goes through save, save_xlsx, or
save_with_format with the SaveFormat enum.
Can it repair damaged XLSX files?
LoadOptions exposes try_repair_package and try_repair_xml flags, and
LoadDiagnostics reports the issues encountered while loading:
let options = LoadOptions {
try_repair_package: true,
try_repair_xml: true,
..LoadOptions::default()
};
let loaded = Workbook::load_xlsx_with_options(&path, &options)?;API Usage
What is the typical pattern for creating a workbook?
Create a Workbook, scope the mutable borrows, write values, then save:
let mut workbook = Workbook::new();
{
let mut worksheets = workbook.get_worksheets_mut();
let sheet = worksheets.get(0)?;
let mut cells = sheet.get_cells_mut();
cells.get("A1")?.put_value_string("Hello")?;
}
workbook.save("hello.xlsx")?;How do I write different value types into cells?
Use the typed setters on a mutable cell: put_value_string,
put_value_i32, put_value_bool, put_value_decimal, and
put_value_date_time.
How do I write a formula?
Use put_formula_with_cached_value, supplying the value Excel should display
before its first recalculation:
cells.get("G1")?
.put_formula_with_cached_value("=F1*2", CellValue::Number(20.0))?;How do I read values back from a loaded workbook?
Fetch the sheet with worksheet (or the worksheet collection), then read
cells via get_cells; display_string_value returns the display text and
value_type reports the stored type.
Known Limitations
Is the crate on crates.io?
Not yet — install it as a Cargo git dependency from the GitHub repository.
Cargo records the exact commit in Cargo.lock, so builds stay reproducible.
Are formats other than XLSX supported?
No. The current release focuses on XLSX round-trip; other spreadsheet formats are not read or written.