PROD- potassium
DORD-Dubnium
input:
20203107PORD
20202101PORD
20200302DORD
20200502PORD
20200102DORD
how i can read each item and segregate if PORD is potassium and DORD is Dubnium?
PROD- potassium
DORD-Dubnium
input:
20203107PORD
20202101PORD
20200302DORD
20200502PORD
20200102DORD
how i can read each item and segregate if PORD is potassium and DORD is Dubnium?
Hi @Venu_V
1.Is the input present in datatable?
2.Do you need to write output in 2 sheets like Potassium and Dubnium sheets?
If that is the case then try like below
potassiumDT = (From row In InputDT.AsEnumerable()
Where row("ColumnName").ToString.Contains("PORD")
Select row).CopyToDataTable()
dubniumDT = (From row In InputDT.AsEnumerable()
Where row("ColumnName").ToString.Contains("DORD")
Select row).CopyToDataTable()
Regards,
What’s source of data and datatype?
What’s expected output?
input is of string type . And output it has to write string only .
Try this
Potassium = String.Join(", ", Input.Split(Environment.NewLine.ToCharArray).Where(Function(x) x.Contains("PORD")))
Dubnium = String.Join(", ", Input.Split(Environment.NewLine.ToCharArray).Where(Function(x) x.Contains("DORD")))
Output:

Regards,
Perfect. Thank you so much
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.