ods
ods copied to clipboard
Spaces at the end of CSV files
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")