Skip to content

faithandbrave/excelion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

excelion

Excel (xlsx) file reader for Elixir.

The library is excellent like interface wrapper of xlsx_parser.

The library provide simple 2 APIs.

get_worksheet_names function returns worksheet name list.

> Excelion.get_worksheet_names("test.xlsx") |> elem(1)
> ["sheet1", "sheet2", "sheet3"]

parse/parse! function returns sheet values matrix.

> sheet_number = 0
> start_row = 5
> Excelion.parse!("test.xlsx", sheet_number, start_row)
> [
>   ["ID", "name", "description", "value"],
>   ["1",  "aaa",  "bbb",         "4"],
>   ["2",  "ccc",  "",            "5"], # empty cell to be empty string
>   ["3",  "eee",  "fff",         "6"]
> ]