CSV Editor for Elixir (Phoenix)
Helpers built to work with Phoenix's page struct to easily work with CSV files.
Setup
Add to mix.exs
# add :csv_editor to deps
defp deps do
[
# ...
{:csv_editor, "~> 0.1"}
# ...
]
end
# add :csv_editor to applications list
defp application do
[
# ...
applications: [ ..., :csv_editor, ... ]
# ...
]
endExample Usage
Use in your template.
<%= CsvEditor.Show.data([], [["cell 1", "cell 2", "cell 3"], ["cell 4", "cell 5", "cell 6"]], ["col 1", "col 2", "col 3"]) %>
<%= CsvEditor.Show.data([], "test/assets/scrape-test-data.csv") %>