Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

odf-report

> 编程语言
Open source

Generates ODF files, given a template (.odt) and data, replacing tags

282 stars0 likes3 views
WebsiteGitHub

About

Generates ODF files, given a template (.odt) and data, replacing tags

ODF-REPORT

Generate .odt documents by filling templates with dynamic content — fields, tables, sections, and images.

For more detailed guides, examples, and API reference, check out the new Documentation Site.

Install

In your Gemfile

ruby
gem 'odf-report'

Quick example

Create a .odt template in LibreOffice with [PLACEHOLDERS], then use the Ruby DSL to fill them in:

ruby
report = ODFReport::Report.new("template.odt") do |r|
  r.add_field :company_name, "Acme Corp"
  r.add_field :date, Date.today.to_s

  r.add_table("EMPLOYEES", @employees, header: true) do |t|
    t.add_column(:name)
    t.add_column(:email)
    t.add_column(:department, :dept_name)
  end

  r.add_image :logo, "/path/to/logo.png"
end

report.generate("output.odt")

There are five kinds of substitutions available:

  • Fields — replace [PLACEHOLDER] text with values
  • Texts — replace placeholders with HTML-formatted content
  • Tables — repeat table rows for each item in a collection
  • Sections — repeat entire document sections with nested content
  • Images — swap placeholder images with actual image files

Documentation

  • Installation — setup and requirements
  • Quick start — build your first document
  • Fields, Tables, Sections, Images — template guide
  • API reference — complete method reference
  • Troubleshooting — common issues and solutions

Issues· 3 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubyodtopenofficereportsruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言