Excel filter by column and create new sheet

Hi,

I have this excel file as shown below. I want to write all rows with “İstanbul” under column “H” on a new sheet.

Can anyone help please ?
Thanks

1 Like

Hi @deha_akbulut

Try this:

istanbulRows = (From row In YourDataTableVar.AsEnumerable()
                    Where row.Field(Of String)("ColumnHName").Trim().Contains("İstanbul", StringComparison.OrdinalIgnoreCase)
                    Select row).CopyToDataTable()

istanbulRows is of DataType System.Data.DataTable.

Please Replace your column name and the name you want t write in seperate sheet accordingly.

Regards

Hi @deha_akbulut

Just use a filter data Table activity.
Use the Filter <Il/Ilce> contains Istanbul
Write the data in another sheet using Write Range or delete the data from existing one and write it using Write Range.

Thanks
Happy Automation!

Hi,

Input:-
image

Output:-
image

Xaml File:-
filter data forum.zip (10.0 KB)

If this works you, please mark this as a solution for others reference.

Thanks

1 Like

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