Read CSV with different delimiters (semicolon and linebreak)

Hey hey,

at the moment I try to find out how to read a csv file with this content:
test;aaa;bbb;ccc\ntest;aaa;bbb;ccc

\n signs the end of line. With standard activities (Read CSV) I get one row out of it, but I expect two:
test; aaa; bbb; ccc
test; aaa; bbb; ccc

Do you have any ideas how to solve this?

Hi @JenJen

Did you keep the delimiter in properties panel of read csv as semicolon?

Yes. Seems like \n is the problem :smiley:

Hi,

Is \n chr(10) or literal?
If latter, can you try the following step?

  1. Read the file as string using ReadYextFile activity.
  2. Replace \n with vblf or vbcrlf.
  3. Parse the string as csv using GenerateDatatable activity.

Regards,

2 Likes

Hi Jennifer,

You can use the “Generate Datatable from text” activity to achieve the required result.
Please refer below screenshots for your reference. Let me know if you have any queries on the same.


Cheers,
Ashutosh

1 Like

Works. Thank you very much!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.