jsonkenl / xlsxir

Xlsx parser for the Elixir language.
MIT License
215 stars 85 forks source link

Fill empty cells when write ets #111

Closed Jindequan closed 1 year ago

Jindequan commented 2 years ago

Fill empty cells when write ets.

Eliminate huge processing of fill_empty_cells/4 in each Xlslir.get_col/2.

Set empty cells by columns

Fix wrong result when executing get_col/2, see the "AA" in pictures below.

  1. If a cell is empty, the excel file won't save any info of it, so we cann't read it from the file. If we loss a cell, we cann't read correct result by get_col/2. Such as a col like this: [1, nil, nil, 1], it'll be get as [1, 1].
  2. So we fill every row with nil cells at the end.
  3. Cells quantity determined by the max length of all rows.

飞书20220419-215502 20220419-215546