Skip to content
Hammad Maqbool edited this page Oct 29, 2026 · 2 revisions

English · 简体中文 · 繁體中文 · Español · العربية · Français · Português (Brasil) · Deutsch · हिन्दी · 日本語 · 한국어 · Русский · Bahasa Indonesia · Türkçe · Italiano · Tiếng Việt

docxi wiki: generate Word (.docx) documents with Ruby

docxi is a Ruby gem that builds Microsoft Word .docx files from code. You get paragraphs, formatted text, tables, images, headers and footers, page numbers, hyperlinks and a simple table of contents. It doesn't need Microsoft Word, LibreOffice or a template, and it works in plain Ruby as well as in Ruby on Rails apps.

The README is the short introduction. This wiki covers every option, has ready-to-copy recipes, explains how docxi works inside, and helps when something goes wrong.

Current release: 0.1.1, for Ruby 2.5 or newer. See the Changelog.

Start here

New to docxi

  • Getting Started: install the gem and create your first document
  • Installation: requirements, Bundler, and upgrading from 0.0.x
  • Usage Examples: reports, invoices, letters and tables from data, ready to copy

Building documents

When something goes wrong

  • Troubleshooting: error messages and documents that don't look right
  • FAQ: short answers to common questions
  • Security: reporting problems and handling untrusted input

Going further

What docxi does, and what it doesn't

docxi creates new documents. It can't open or edit an existing .docx, fill in a Word template or run a mail merge. It has no numbered lists, heading styles or automatic table of contents, and pages are always US Letter in portrait. The known issues planned for 0.2.0 are listed on the Roadmap.

Credits

docxi is maintained by Hammad Maqbool at Phaedra Solutions. It started in 2016 from docxer by Timur Gabdrakipov. See Credits for details.

Languages

English is the reference version of this wiki. Translations are linked in the sidebar and at the top of every page.


README · RubyGems · Report an issue

Clone this wiki locally