talira

umya-spreadsheet

A pure rust library for reading and writing spreadsheet files

open sourceMITself-hostablefree

umya-spreadsheet is a pure Rust library that reads and writes Excel .xlsx and .xlsm workbooks, so a program can open an existing file, change cell values, styles, rows, columns, charts or images, and save it again; it can also create workbooks from scratch and write CSV. It reads lazily when asked (loading worksheets only when they're used), writes password-protected files, and has a js feature for WebAssembly. Unlike calamine, which only reads, and rust_xlsxwriter, which only writes new files, it does both in one workbook model. Open issues on its tracker report charts, comments and form controls lost or changed when some existing workbooks are saved, so test round trips with real files.

Problems it solves

  • open an existing Excel file in Rust, change a few cells and save it without losing the formatting
  • update values in a spreadsheet template and write a copy for each customer from a Rust program
  • read cell values and their formatted text from xlsx files in Rust
  • change cell background colours, fonts and borders in an existing workbook from code
  • add a line or bar chart to an Excel workbook my Rust service generates
  • insert an image into a worksheet from Rust
  • save an Excel file with a password from a Rust program
  • load only the worksheet I need from a very large workbook to save time
  • edit macro-enabled .xlsm files without breaking the macros
  • move a range of cells to another place in a sheet from code
  • read and write Excel files from Rust compiled to WebAssembly

Features

  • read and write xlsx and xlsm; write csv
  • lazy reading that loads worksheets on demand
  • cell values, formatted values and styles: read and edit
  • rows and columns, including auto width
  • charts and images: read, edit and create
  • drawings and OLE objects: read and edit (the README says these may still be inconvenient)
  • move ranges, copy and add worksheets
  • write with a password, or add a password to an existing file
  • js feature for WebAssembly builds

Limitations

  • Doesn't read legacy .xls or OpenDocument .ods spreadsheets: it reads and writes xlsx and xlsm, and writes csv1

Capabilities

Has official SDKsplan not known

Alternatives

The same job

These do what umya-spreadsheet does.

  1. rust_xlsxwriter A Rust library for creating Excel XLSX files.
  2. calamine A pure Rust Excel/OpenDocument SpreadSheets file reader: rust on metal sheets

Compare umya-spreadsheet with the top 3