I need help to solve this issue.
In an excel file there are 4 sheets present in it how can we find top 5values for all sheets using uipath
Hope the below steps would help you resolve this
Use a excel application scope and pass the filepath as input and get the output from the same activity named out_workbook
Now use a for each activity and pass out_workbook.GetSheets as input
And change the type argument as String
Inside the loop use a READ RANGE activity and get the output as dt
Then use a SORT DATATABLE activity and pass dt as input
Now inside the same loop use ASSIGN activity like this
dt = dt.AsEnumerable().Take(5).CopyToDatatable()
Inside the same loop use a write range activity and for that search as workbook in activity panel and under that choose write range activity
There pass filepath of new excel file and mention input as dt and enable add headers and sheetname as item.ToString
And finally inside the loop use a clear datatable range activity and pass dt as input
Then this will work for all the sheet and gets you the top five rows in all sheets and write in a new excel file
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.