For each row in a .csv activity inconsistently terminates at end of data

When using the “for each row” in a .csv file that I’ve read, sometimes the “for each row” activity will end when all of the data rows have been processed. But other times, it will continue trying to process blank rows into perpetuity.

Is this normal? Is there an easy fix that I can use when formatting my .csv source data.

Do I need to use a “Do while” activity. What’s the best way to accomplish this?

I am a novice at all of this, so please be kind.

Additional information:

I normally save my .xlsx as a .csv so I can use UiPath to read the .csv. This error where UiPath continues to process the blank rows is more likely to occur if I save the .csv and then delete the rows of data that I don’t want to process.

For example:
Starting with 100 rows of data in the .xlsx file.
Save as .csv with 100 rows
Delete the duplicate rows in the .csv (left with 50 rows) and save.
UiPath will still try to process all 100 rows, even though the last 50 are blank.

I believe MS Excel uses the RCF 4180 specification for the export of .csv files. I’m thinking that the CRLF (the designator to move to the next line), may present/leftover from the original 100 line .csv file, but I haven’t figured out how to check that.

Any suggestions on how to solve this problem would be appreciated.

Hello @dwilson,

Any solution for the above problem?

Thank you.

Sorry, I did not find a solution. I don’t use Uipath anymore.

Dan W.

**Dan Wilson

**Data Analyst

p 781-305-2381

This email, including attachments, may include confidential and/or proprietary information, and may be

used only by the person or entity to which it is addressed. If the reader of this email is not the intended

recipient or his/her authorized agent, the reader is hereby notified that any review, dissemination, distribution

of this communication is prohibited by the sender. To do so might constitute a violation of the Electronic

Communications Privacy Act., U.S.C. Section 2510-2521. If you receive this email in error, please notify

the sender by replying to this message and delete this email immediately.