Separate one table into another tables base on column value

Hi Everyone.

I have a Table and want to separate into 3 tables and write into 3 excel file as below picture base on value “codepattern” and “codeno” value.

How to do that ?

Thanks you!

Hi,

Can you please specify clearly what are the filtering criteria’s in the main table.

Thanks

1 Like

@trunghai

give a try on:

Assign activity:
left side: TableList - DataType: List(of DataTable)
rightside:

(From d in YourDatatableVar.AsEnumerable
Group d by k1=d(1).toString.Trim, k2=d(2).toString.Trim into grp=Group
Select grp.CopyToDataTable).toList

with a for each over TableList (TypeArgument: DataTable) you can write out the different Table splits to Excel

Feel free to use columnnames instead of column indexes within the statement

1 Like

Hi bro @Shikhar_Tandon

The data always be changed, so could not filtered in column.

Hi Bro @ppr

Could you pls check in attached file and make a XAML file to separate main table into 3 sub-tables ??

Thanks you so much!
MainFile.xlsx (10.3 KB)

Hi everyone… anyone has another solution ?

Thanks in advance!

@trunghai
find starter help here:
trunghai_SplitDataTable.xaml (8.5 KB)

2 Likes

Hi Bro.

Thanks so much!

Hi Bro.

I have a division ( 12/10 )… i want to got balance is 2 ?

What is the command ??

Thanks you very much!

Sorry… i have something wrong

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