19 releases

0.1.18 Nov 5, 2024
0.1.17 Oct 15, 2024
0.1.14 Sep 29, 2024

#1798 in Parser implementations

Download history 427/week @ 2024-09-10 662/week @ 2024-09-17 883/week @ 2024-09-24 215/week @ 2024-10-01 239/week @ 2024-10-08 186/week @ 2024-10-15 7/week @ 2024-10-22 2/week @ 2024-10-29 143/week @ 2024-11-05 4/week @ 2024-11-12 9/week @ 2024-11-19

157 downloads per month
Used in ooxmlsdk

MIT/Apache

180KB
5K SLoC

Open XML SDK for Rust

crates.io docs

Open XML SDK for Rust (ooxmlsdk) is a Rust library for working with Office Word, Excel, and PowerPoint documents. The basic idea is inspired by .NET Open XML SDK.

Features

  • Deserialize/serialize OOXML for Rust structs
  • Namespace support
  • Read & Write docx, xlsx and pptx file
  • All Rust structs and ser/de code are generated from metadata (crates/ooxmlsdk/data)
  • Documentation for Rust structs

What's missing

  • No validation (WIP)
  • No Particle: all xml children is in a flattern children vector of enum (OneSequence is supported, xml children are represented as struct's fields)

Project Structure

  • crates/ooxmlsdk: generated code for deserialize & serialize OOXML
  • crates/ooxmlsdk-build: generate code for deserialize & serialize OOXML
  • examples/*: examples

Known Issues

  • This library raise recursion limit by #![recursion_limit = "768"] for cargo doc, you may need to add it too, be cautious when use.
  • Currently no serde support: intial benches show serde slower than current custom implemention; serde somehow not good at working with xml, you need a lot of special rename for xml attribute or children.

License

MIT OR Apache-2.0

crates/ooxmlsdk/data is directly copied from .NET Open XML SDK so this directory is licensed under this license

Dependencies

~9MB
~160K SLoC