Skip to content

jnylen/xler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

dfaa2a9 Â· Mar 20, 2023

History

59 Commits
Oct 20, 2020
Apr 11, 2019
Apr 23, 2019
Dec 24, 2021
Aug 23, 2019
Apr 11, 2019
Jun 27, 2019
Oct 20, 2020
Apr 11, 2019
Oct 20, 2020
Dec 24, 2021
Mar 20, 2023

Repository files navigation

Xler

Xler uses the Calamine Rust library to get contents of Excel files.

Calamine supports:

  • excel (xls, xlsx, xlsm, xlsb, xla, xlam)
  • opendocument spreadsheets (ods)

Installation

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

def deps do
  [
    {:xler, "~> 0.6.0"}
  ]
end

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

Worksheets

To get the worksheets of a file you use:

Xler.worksheets("filename.xls")

and it will return as a tuple:

{:ok, ["Sheet 1"]}

Parse

To get the data of a worksheet you use:

Xler.parse("filename.xls", "Sheet 1")

and it will return as a tuple:

{:ok, [["Date", "Time"]]}