CSV File “read CSV” 사용시 empty row 이후 read 되지 않는 문제 해결 방법 좀 알려주세요!
CSV파일을 “Read CSV” activity 사용하였는데 파일내 data일부만 read 되고 있습니다.
아래 예에서 처럼 CCC row까지만 read되고 empty row 이후에는 read 되지 않는데
EEE row까지 모든 내용을 read 할 수 있는 방법이 있을까요?
I used the “Read CSV” activity for the CSV file, but only part of the data in the file is being read.
As in the example below, only up to the CCC row is read and no reading occurs after the empty row.
Is there a way to read all rows up to the EEE row in the CSV file?
Hello @jukim, here is a step-by-step guide to solve the problem and the UiPath project file is attached. If this step-by-step guide helped you solve the problem, please mark this issue as solved.
The behavior you are describing occurs because, by default, the “Read CSV” activity in UiPath interprets an empty line as the end of the data. To handle this and ensure that all lines are read, including those after an empty line, you can use an alternative approach.
Use “Read Text” to load the CSV file into a string.
Use “Assign” to split the lines: lines = text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
Re-merge the valid lines: textNoEmptyLines = String.Join(Environment.NewLine, lines)
Use “Write Text” to save the text to a clean CSV file.
Use “Read CSV” on the new file.
Here is the UiPath project WorkflowCSV.zip (3.2 KB)