xou/elixlsx

xls files returning `nil` for integers

Closed this issue · 1 comments

I have two files TestRun.xlsx and TestRun.xls that should return the same.
However xls files are return nil where there should be an integer.

 {:ok, pid, parser} = Exoffice.parse("test/csv_examples/TestRun.xls", 0)
 s = Exoffice.get_rows(pid, parser)
 Enum.map(s, fn(row)-> 
    Enum.map(row, fn(item) -> item end) 
  end)
assert xlsx_sheet_to_list("test/csv_examples/TestRun.xlsx") ===  [
               ["ID", "Thing 1", "Things 2 "],
               [1, "apple ", "blue "],
               [2, "orange", "red"],
               [3, "pear", "green",
               [4, "strawberry", "yellow"],
               [5, "blueberry", "purple"],
               [6, "kiwi", "orange"],
               [7, "lime", "cyan"],
               [8, "lemon", "magenta"]
             ]
assert xls_sheet_to_list("test/csv_examples/TestRun.xls") === [
               ["ID", "Thing 1", "Things 2 "],
               [nil, "apple ", "blue "],
               [nil, "orange", "red"],
               [nil, "pear", "green",
               [nil, "strawberry", "yellow"],
               [nil, "blueberry", "purple"],
               [nil, "kiwi", "orange"],
               [nil, "lime", "cyan"],
               [nil, "lemon", "magenta"]
             ]

You probably should look here. This is the repo for Elixlsx, not Exoffice.