ods icon indicating copy to clipboard operation
ods copied to clipboard

Spaces at the end of CSV files

Open MBuchalik opened this issue 3 years ago • 5 comments

I tried loading a CSV file (using the Adapter) with a structure like this:

column1,column2,column3
first,second,third




There are a few newlines after the second row.

Expected result

I would expect to only get two rows in the result like so:

[
  ["column1", "column2", "column3"],
  ["first", "second", "third"]
]

Actual result

I am getting multiple "empty" rows at the end:

[
  ["column1","column2","column3"],
  ["first","second","third"],
  [""],
  [""],
  [""]
]

Here is a sample CSV file for you to try it out: spaces.zip

A similar issue happens if there is an empty line between the rows like here: spaces2.zip. But I am not sure if we should clean that up or not. (Intuitively, I would say "yes")

MBuchalik avatar Dec 15 '20 09:12 MBuchalik