Reading The Row and splitting

I want to read an Excel row and if the last 4 digits equals of all the values present in the column of the row matches the condition then i want those all the rows to be written into separate excel sheet.
Please help asap.
For example,there is an Excel sheet with
Item No.

So i want to pick up only those rows whose last ends with “GLG=1” and writes it into separate excel sheet.

@harinathreddy.yn please suggest on this as well

Hi @somya177,

Please find the attached workflow for splitting the rows and write into separate excel sheet.

Splitting (14.5 KB)

Hope it helps!

Saranya K R

Thanks Saranya…But I need Header Names as well in the splitted sheet

In Read range activity, add headers must be unchecked.

Modify the if statement.

Hi @somya177
Please check below (9.7 KB)


it didn’t come .

Check out the modified workflow.

Splitting (14.2 KB)


  1. Read the excel data by using Read range activity and assign it to dataTableVariable1(Select Add header options)
  2. Using assign activity

DataTablevariable2=dataTablevariable1.Select("[Item No.] Like ‘%GLG=1’").CopyToDataTable

  1. Write datatablevariavble2 to new excel sheet(select add header options)

thanks saranya…:slight_smile:
Now i have other data also to written with it which are present in column 2 and 3 with Column1 if Column1 condition matches.
Please suggest

Two more collections can be created in the similar way to store Column2 and Column3 values.

and then use write range activity instead of write cell finally…?
glg=1 data1 pass1
glg=2 data2 pass2

like this it has to come in separate excel

Write range activity cannot be used here, as DataTable is required as input for this activity.

Instead, you can use write cell activity with “B” + count and “C” + count for two columns.

for all it is giving this same data in separate excel using write cell for B and C
glg=1 data1 pass1
glg=1 data1 pass1
glg=1 data1 pass1
glg=1 data1 pass1
Instead it should give

glg=1 data1 pass1
glg=2 data2 pass2

use the code which I have given and in build data table please add 2 more columns.

can you please suggest something on that sharanya’s code which i have ticked solution.As i started working on that Before you sent the workflow.
Would be great help.

Please confirm me whether “GLG =2” needs to be filtered out in the same way as “GLG=1”.
If possible could you send me sample excel file.

yes…then GLG02 data1 pass1 will be in different excel

For every “GLG=some integer”, a separate excel needs to be created. Am i right?

yes…if its glg=2 data1 pass1 then a separate excel
if its glg=3 data1 pass1 then a separate excel

okay, let me think and suggest you some solution.:slight_smile: