File Reader issue with csv: in-cell line-breaks

FIle Reader has a small bug where as csv files containing soft-returns (eg only \n instead of \r\n in windows) can not be read. SUch csv files are created from Excel when a cell has multiple lines in it. See attachment.

The error is:

Execute failed: Too few data elements (line: 1 (Row0),

Note that new lines withn a cell is allowed according to the specification and hence file reader should be able to deal with this.

https://tools.ietf.org/html/rfc4180

Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes. For example: "aaa","b CRLF bb","ccc" CRLF zzz,yyy,xxx

 

Hi!

Did you try to open the "Advanced" dialog and add double quotes (") in the "Quote support" tab? Also check the "Quoted strings can extend over multiple lines" option. With these settings it works for me.

 - Peter.

I think the issue in my case is a combination of other things as well especially limiting rows. The skip first n rows configuration does not take the "Quoted strings can extend over multiple lines" option into account. It just starts reading at the n th row in the text file and not the n th "actual data row". That seems to be the main problem.

I think I create a bug report for this.

Hi there. I am having issues with File Reader as above error. I have amended Advanced setting to ‘Accept Short Lines’ and this fixes the problem.

However, when I try to run the workflow via a Batch file, the nodes to not appear to configure properly and workflow fails every time. When reopening the workflow manually In KNIME, clicking into the File Reader node and clicking Accept and Okay, all works fine again.

I have tried to force variables within knime once passed via batch file and have forced ‘True’ to accept short lines and still not running. Is this an issue with KNIME version 4? How do we get around this?

Hi there @SarahKno91,

welcome to KNIME Community!

Can you please open a new topic for your issue? This one is pretty old and actually you figured out solution to issue this topic is about. Also new topic will get more attention :wink:

EDIT: I know see you have already done it: KNIME Run Batch File - File Reader Node Config Issue

Br,
Ivan