Spreadsheet files, with clear boundaries.

Read and write a documented subset of XLSX and ODS in Ruby. Lesath preserves supported cells and rejects features it cannot keep intact.

CRuby 3.2 or newer. Available on RubyGems.

Workbook exchangesupported cells
Example spreadsheet with text and numeric cells
ItemAmount
Tea12.50
Coffee8.00
Water4.25
sales.xlsxsales.ods
Supported scalar cells can move between both formats. Formula languages are not translated.

Predictable by design.

Interchange without quietly changing the workbook you meant to keep.

Keep the essentials

Multiple ordered sheets, sparse cells, strings, finite numbers, and booleans.

Know what is unsupported

Styles, charts, merged cells, and other unsupported features fail on import rather than disappear.

Handle formulas honestly

Store formula text and a cached value in the same format. Lesath does not calculate or translate formulas.

Write your first workbook.

Install the gem, create a sheet, and read back its cells. Coordinates start at 1. Choose a new filename each time you export.

gem install lesath
Follow the getting started guide
require "lesath"

book = Lesath::Workbook.new.add_sheet("Sales")
book.set("Sales", 1, 1, "Item")
book.set("Sales", 1, 2, "Amount")
book.set("Sales", 2, 1, "Tea")
book.set("Sales", 2, 2, 12.5)

Lesath.write(book, "sales.xlsx")
copy = Lesath.read("sales.xlsx")
copy.cell("Sales", 2, 2).value # => 12.5

Lesath.write(copy, "sales.ods")

Supported scalar cells can move between formats. Formula text stays in its original format and is never calculated.

Find the detail you need.