All Projects → xou → Elixlsx

xou / Elixlsx

Licence: mit
An Elixir XLSX writer

Programming Languages

elixir
2628 projects

Elixlsx

Build Status Module Version Hex Docs Total Download License Last Updated

Elixlsx is a writer for the MS Excel OpenXML format (.xlsx).

Features:

  • Multiple (named) sheets with custom column widths & column heights.
  • (Unicode-)strings, Numbers, Dates
  • Font formatting (size, bold, italic, underline, strike)
  • Horizontal alignment and text wrapping
  • Font and cell background color, borders
  • Merged cells

Installation

Elixir 1.3 and above

Via Hex, in mix.exs:

defp deps do
  [{:elixlsx, "~> 0.4.2"}]
end

Via GitHub:

defp deps do
  [{:elixlsx, github: "xou/elixlsx"}]
end

Elixir pre 1.3

defp deps do
  [{:elixlsx, "~> 0.3.1"}]
end

Via github:

defp deps do
  [{:elixlsx, github: "xou/elixlsx", tag: "v0.3.1"}]
end

Usage

1-Line tutorial:

(alias Elixlsx.Workbook, alias Elixlsx.Sheet)
iex(1)> Workbook.append_sheet(%Workbook{}, Sheet.with_name("Sheet 1") |> Sheet.set_cell("A1", "Hello", bold: true)) |> Elixlsx.write_to("hello.xlsx")

See example.exs for examples how to use the various features.

Number and date formatting reference

A quick introduction how number formattings look like can be found here.

License

Copyright (c) 2015 Nikolai Weh

This library is MIT licensed. See the LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].