Hi @all,
I am facing problem to remove empty rows, cells and columns using LINQ query in UiPath studio. Please help me to fix the issue.
Sample Input:
Expected Output:
If anyone know the solution, please share with here.
Thanks in Advance!
Hi @all,
I am facing problem to remove empty rows, cells and columns using LINQ query in UiPath studio. Please help me to fix the issue.
Sample Input:
Expected Output:
If anyone know the solution, please share with here.
Thanks in Advance!
If all rows have same number of columns data that is 4 in your case…we can try like this.
(From d In dtinput.AsEnumerable() Where Not(d.itemArray.All(function(x) String.IsNullOrEmpty(x.ToString))) Let ra = d.ItemArray.Where(function(x) Not String.IsNullOrEmpty(x.ToString)).Select(function(x) x.ToString) Select r = Dtoutput.Rows.Add(ra)).CopyToDataTable()
Cheers
Thanks for quick response. The value could change and position also change (I given as sample input). My aim is remove all empty rows, cells and columns and save value only.
Do you have any idea?
As mentioned value and position can change…but every row should have same number of values…as in your example every row has 4 …so we can acheive it…we have to build the output datatable with 4 columns…if its 5 next time you have to build for 5 columns and so on
Hope this helps
Cheers
@Anil_G
I think there is small gap in requirement. Please check my exact requirement in below
Input
Expecting Output:
Note : The values are changed each and every time, nothing is constant here.
I get it…I am just checking if the cell is empty or not but not for any value…
Did you even try that?
Cheers
Hi @Anil_G
As of now I don’t get any proper solution for this issue. Currently I am using For each loop only
If you get any potential solution, please let me know.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.