Page 1 of 1

Writing to CSV or Flat File without Rowset

Posted: Mon Feb 29, 2016 11:49 am
by jlee1
Is it possible to create a CSV without using a rowset input variable? I have 5 variables that i want to write to a file with pipe delimiters but the only way is with a rowset variable. Is it possible to create a rowset variable using the 5 variables?

Re: Writing to CSV or Flat File without Rowset

Posted: Mon Feb 29, 2016 12:04 pm
by Support_Rick
JLee,

Yes, you can loop through a Rowset and write out a CSV by utilizing the PRINT Task.

Just Print the values you want to text:

ForEach ${MyRowset} -> var
${var[1]},${var[2]},Code3,${var[4]},2332.30,${var[5]}${system.carriageReturn}
-> Append (True)
-> Print to file MyCSVFile.csv
EndForEach

Read MyCSVFile.csv

It's that simple!