Unable to add CSV & select data to pass using loops

excel
csv
activities

#1

Hello I’m a beginner,
I’m unable to select the row data once read csv is selected, I’m trying to achieve the following tasks

  1. Read CSV
  2. Select Data from each row (Header wise I have got 6 Headers like First Name, Last Name, Contact, Address, Pincode & State) total 3 records
  3. Process Loop or data until row 6 which is blank

I tried using Read CSV Forum and every possible Knowledge article but nothing seems to be working.

Please help


#2

@Ankit_Chopra where u getting error?


#3
  1. Added CSV (read csv i didn’t create any variable but added DatabaseName as Test)
  2. Inserted for Each Row
  3. Write Line
  4. Trying to Convert CI ID (First name) Text to String but getting following error

Please find the screenshot :frowning:


#4

Convert.ToString(row(“column name”))

In your case : Convert.ToString(row(“CI ID”))


#5

@Ankit_Chopra Try below code
row(“CI ID”).toString


#6

I guess the issue is with the dot(.) in front of row.
Remove the dot and it should work fine.

If you have already checked Include column names checkbox in Read CSV activity, then you can directly use row("First Name").ToString

Also when you want to use the available functions of VB.net like ‘ToString’, try not to type them by yourself. Use the ‘intellisense’ feature. Example, in your case, after row(“First Name”) if you keep a dot and type a few letters of the function you want to use, you should be getting the available functions that you can use for the data type. Choose from one of them so that you don’t force the tool to do something it cannot.

Hope this helps


#7

Thank you all. This works