Exoffice v0.3.2 Exoffice.Parser.CSV

Link to this section Summary

Functions

Example

Example

Returns a list of supported extensions by parser

Example

iex> [{:ok, pid}] = Exoffice.Parser.CSV.parse(“./test/test_data/test.csv”) iex> is_pid(pid) true

Link to this section Functions

Example

iex> [{:ok, pid}] = Exoffice.Parser.CSV.parse(“./test/test_data/test.csv”) iex> Process.alive? pid true

iex> [{:ok, pid}] = Exoffice.Parser.CSV.parse(“./test/test_data/test.csv”) iex> Exoffice.Parser.CSV.close(pid) iex> Process.alive? pid false

Link to this function count_rows(pid)

Example

iex> {:ok, pid} = Exoffice.Parser.CSV.parse_sheet(“./test/test_data/test.csv”, 1) iex> Exoffice.Parser.CSV.count_rows(pid) 22

Returns a list of supported extensions by parser

Callback implementation for Exoffice.Parser.extensions/0.

Example

iex> {:ok, pid} = Exoffice.Parser.CSV.parse_sheet(“./test/test_data/test.csv”, 1) iex> Exoffice.Parser.CSV.get_rows(pid) |> Enum.to_list [ [“2”, “23”, “23”, “2”, “asg”, “2”, “sadg”], [“sd”, “123”, “2”, “3”, “12”, “”, “23”], [“g”, “”, “”, “1”, “”, “1”, “”], [“2016-01-01”, “”, “”, “”, “3”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”], [“”, “”, “”, “”, “”, “”, “”] ]

Link to this function parse(path, options \\ [])

iex> [{:ok, pid}] = Exoffice.Parser.CSV.parse(“./test/test_data/test.csv”) iex> is_pid(pid) true

Link to this function parse_sheet(path, _, options \\ [])

Example

iex> {:ok, pid} = Exoffice.Parser.CSV.parse_sheet(“./test/test_data/test.csv”, 1) iex> is_pid(pid) true