excelion v0.0.5 Excelion
Excel (xlsx) file reader for Elixir.
The library is excellent like interface wrapper of xlsx_parser.
Summary
Functions
The function returns worksheet name list of specifiled .xlsx file. If fail get content, return :error
The function parse .xlsx file. If fail get content, return :error.
The function parse .xlsx file. If fail get content, raise File.Error
exception
Functions
The function returns worksheet name list of specifiled .xlsx file. If fail get content, return :error
.
Parameters
path
: .xlsx file pathzip
: An optional parameter of the zip processing module is allowed (for testing purposes).
Example
> Excelion.get_worksheet_names("test.xlsx") |> elem(1)
> ["sheet1", "sheet2", "sheet3"]
The function parse .xlsx file. If fail get content, return :error.
Parameters
path
: .xlsx file pathsheet_number
: 0-based sheet numberstart_row
: first use row number (1-based)zip
: An optional parameter of the zip processing module is allowed (for testing purposes).
Example
> sheet_number = 0
> start_row = 5
> Excelion.parse("test.xlsx", sheet_number, start_row) |> elem(1)
> [
> ["ID", "name", "description", "value"],
> ["1", "aaa", "bbb", "4"],
> ["2", "ccc", "", "5"], # empty cell to be empty string
> ["3", "eee", "fff", "6"]
> ]
The function parse .xlsx file. If fail get content, raise File.Error
exception.
Parameters
path
: .xlsx file pathsheet_number
: 0-based sheet numberstart_row
: first use row number (1-based)zip
: An optional parameter of the zip processing module is allowed (for testing purposes).
Example
> 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"]
> ]