Unsure how to print rows from a CSV

Hi, I’m just getting started on StudioX. I’ve watched the examples of printing rows from an excel, and trying to duplicate this from a CSV.

This is what I did (so far):
Step 1: Add Read CSV as activity
- Selected a CSV file from my directory
- Output to a variable which I created as DataT

Step 2: Add For Each Row in Data Table as activity
- Selected Use Variable “DataT”
- Within the body, added Message Box as Activity
- Within the Text section, (unlike the example from reading from excel), I can’t figure how to indicate the column of the CSV to print. My trials have only led to a message box System.Data.DataRow

Let me know if I’m missing something (I’m certainly is!)

can you share your csv file. if it is in txt file format then based on some delimiter need to convert as row and column. once u got headers using loop activity inside the body please provide iterative variable name (“Column name”).to string

@punggol612

If would be similar as datarow is same for excel or csv

one thing you can do is to use open advanced editor and give currentrow("ColumnNameYouNeed").ToString

cheers

Thank you very much @Anil_G

1 Like

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