How to get data of all rows of last column
Hi @bhavik_parekh
welcome to uipath community
–use a excel application scope activity and pass the file path as input
–use read range activty and get the output with a variable of type datatable named outdt
–use a for each row loop and pass the above variable outdt as input
–inside mention like this in writeline activity or use a assign activity with value as
row(outdt.Columns.Count-1).ToString
–this will print the value of all the row values in the last column of the table
Hope this would help you
Cheers @bhavik_parekh
@Palaniyappan and @GouthamVijay Thanks for the reply, i actually achieved using below line of code
NewRowsDT.Select().CopyToDataTable().DefaultView.ToTable(False, “Responses”)
My table had Columns → ID, Name, Responses
Now i need to remove the Header from the output Data table , how do i do that… In this Case i want to remove header name “Responses”
Fine, thats a good one
but i would like to suggest to go for this
NewRowsDT.DefaultView.ToTable(False, “Responses”)
and to remove the datatable header
–use write csv activity and uncheck add headers, pass the datatable as input
and the output will be a csv file, with data without headers
Cheers @bhavik_parekh
@Palaniyappan Now how do i put the CSV data into a list of strings … ?
Can i Use this - > From row In DataWithOneColumnDT.AsEnumerable() Select Convert.Tostring(row(“Responses”)).ToList()
@Palaniyappan Yes … I can do that instead of creating a CSV … but what should Variable Type to store this list … I am unable to find that
kindly search like this
system.collections.generic.list(of string)
make sure that the variable is initialised
with this new list(of string) as default value in the variable panel
Yes perfect
But mention the default value as new list(of string) in the variable panel
@Palaniyappan Thanks…
Now i want to pass these List of strings in an Email as below (Items)
How do i do that … At present i have two strings in the List (ListOfStrings) and i have hardcoded as below in HTML
How do i make system automatically ready the length of ListOfStrings and put each one by one on it own in the HTML content… ?
Thanks in advanced… … @Palaniyappan