If my excel contains highlighted data for account owner display name column then i should remove entire row. Can anyone help me please. It's very urgent


if my excel contains highlighted data for account owner display name column then i should remove entire row for those data

@sandhyareddy

Follow the steps

Initialize a counter with value 0

  1. Read the data into DataTable say dt
  2. Use for loop with Enumerable.Range(2,dt.Rowcount).ToArray (Assuming data starts from row 2) and change type argument to integer for for loop(in latest it will pick automatically)
  3. Use a get cell color activity and give the cell as Excel.Sheet("Sheetname").Cell("H" + (currentitem - counter).ToString) and save color to varcolor
  4. Use if condition to check the color using varcolor.R.ToString.equals("0") similarly check for B and G…for transparent or no color I believe the values are 0 ,0,0 check the same by getting color of transparent one and the colored one and give condition accordingly
  5. on the then side do nothing as it is not colored and on else side use a delete row activity and pass row as currentitem - counter
  6. then increment counter counter = counter+1

This will check the color and delete all colored rows

cheers

Here, no need of colour just in a column if that data exists then i should remove entire row that’s all.

@sandhyareddy

Then you can directly use like this

If you need any other filters change filter accordingly

If not in the above nethod instead of get cell color use read cell in step 3 get the value and in step 4 if condition check {"value1","valu2", andso on}.contains(outputvarOfReadcell) and if matchign use delete row

cheers

I didn’t got how to do it.

output.xlsx (52.6 KB)
this is excel in E column if the data consists pressure training, ZM Zurich, CRC Central, Lift Training then i should delete entire row.Can you please tell me now.

Hi @sandhyareddy ,

Hope you’re doing great.

I have created workflow to help you to filter those records from provided excel file.

FilterUserData.xaml (9.9 KB)

@sandhyareddy

This is how you will do

Sequence3.xaml (16.8 KB)

cheers

I was not able open this .xaml for me i am getting invalid .xaml file

Hi @sandhyareddy ,

are you using the latest community version?

Please try to access the attached project file.

Filter.zip (67.1 KB)

Thankyou Soo much for your help. Really Very Thanks! :blush:

1 Like

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