Filter Excel data and saved in different Sheet

Hi, https://global.discourse-cdn.com/uipath/original/4X/5/f/a/5fa77efbd5d8ad30a0c8ebe728d2ea6770736381.jpeg
I want to filter the column of “Industry” and need to write it into different Sheets.

For Example, I want the particular Industry type “Communication” and write it into a new Sheet name (Communication).

I used the Filtered data table Activity but it filters only one Industry Type at a time.

Can you elaborate For filter industry column on which basis?

I need to create a sheet according to the Industry type and write the filtered data into that Sheet.

Pls check the shared excel Image.

Hello @prudhvi_raj1

  1. Read the Sheet using Work book Read range activity and Sytored in DT_Input
  2. Create the New variable as DT_Unique and assign
DT_Unique=DT_Input.DefaultView.ToTable(true, "Industry")
  • You can get the unique name of a particular column(Without duplicate)
  1. Use For each data table and loop the DT_Unique data
  • Use the filter option and pass the filter value as CurrentRow(0).tostring, Pass input as DT_Input and get Output as DT_Output
  • Write the data in the desired sheet using the WoorkBook Write range.
  • Use Sheet name as Currentrow(0).ToString

If possible Provide the sample Excel file.

Hi, you can try this

Untitled

list_dt = (From d In dt.AsEnumerable
Group d By k=d(“Industry”).toString.Trim Into grp=Group
Select grp.CopyToDataTable).toList
*list_dt is list of datatable

Type argument for each is integer

Cheers

raj.xlsx (10.3 KB)

Hello @prudhvi_raj1
Kindly find the Xaml file, You will get some Idea
Forum_ExcelDataFilter.zip (165.8 KB)

Hi, @Gokul_Jayakumar

It’s working on a single individual file of a given excel file, but when I access the latest downloaded file and work on it does not perform the task, kindly check the attachment.

Thank you for your response.

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