Ootempl

Office Open XML document templating library for Elixir. Generate customized Word documents by replacing placeholders in templates with dynamic data.

Features

Quick Start

Create a Word template with placeholders:

Dear {{customer.name}},
Your order total is {{total}}.

Generate a document in Elixir:

data = %{
"customer" => %{"name" => "John Doe"},
"total" => "$99.99"
}
Ootempl.render("template.docx", data, "output.docx")
#=> :ok

Installation

If available in Hex, the package can be installed by adding ootempl to your list of dependencies in mix.exs:

def deps do
[
{:ootempl, "~> 0.1.0"}
]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ootempl.