office-toolkit
A pure-Rust library to create, read, and modify Microsoft Office documents in the modern Open XML format (.docx, .xlsx, .pptx).
This is the facade crate: the single entry point most consumers should depend on. It re-exports word-ooxml, excel-ooxml, and powerpoint-ooxml (each behind its own same-named Cargo feature, all three enabled by default) plus the drawing/chart crates shared across all three formats, and adds filesystem convenience (open, OpenFile, SaveToFile) on top of them.
Status: active development. Word, Excel, and PowerPoint are functional today through this crate.
Usage
[]
= "1.0"
use *;
use SaveToFile;
// `Document`/`Paragraph` come straight from the prelude; `save_to_file`
// needs its own `SaveToFile` trait imported, like any trait method.
let document = new.with_paragraph;
document.save_to_file?;
// Open any .docx/.xlsx/.pptx without knowing its format ahead of time.
let opened = open?;
# Ok::
Only need one format? Opt out of the other two to trim the build:
= { = "1.0", = false, = ["excel"] }
Documentation
For the full per-feature API reference (what to call for bold text, cell formatting, chart building, table styles, and everything else) and an explanation of how this crate's feature flags and prelude are put together, see the workspace docs — Architecture.md and API_Reference_docx.md/_xlsx.md/_pptx.md.
See the workspace README for the full project goals and crate layout.
License
Licensed under the MIT license.