Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.43 KB

README.md

File metadata and controls

39 lines (25 loc) · 1.43 KB

XlsxParser

Build Status Coverage Status Project license Hex.pm package Hex.pm downloads

Simple parsing of xlsx spreadsheet data. Data can be retrieved or written to csv.

Usage

Parsing an .xlsx

{:ok, ret} = XlsxParser.get_sheet_content("/path/to/my.xlsx", 1)

ret will contain a list of {column, row, value}:

[{"A", 1, "a"}, {"A", 2, "c"}, {"B", 1, "two"}]

Writing to CSV

{status, ret} = XlsxParser.write_sheet_content_to_csv("/path/to/my.xlsx", 1, "/path/to/my.csv")

ret will contain the full text written out to /path/to/my.csv

DISCLAIMER:

This parser works on documents I have so far encountered. Please verify that it works for your documents before using in production. Log any issues via github.

This package can be installed by adding xlsx_parser to your list of dependencies in mix.exs:

def deps do
  [
    {:xlsx_parser, "~> 0.1.2"}
  ]
end