Delete row in excel in value in column = 0

Delete row in excel in value in column Amount = 0

image

Please guide me about it.
(Data have 5k rows)

Hi @fairymemay

Use filter Data table

Use Write range activity
Write the Data in the excel

Hope it will works

Regards
Gokul

Hi @fairymemay

How about using the below LINQ expression!


(From d In dtOrig.AsEnumerable()
Where Not dtRemoval.AsEnumerable.Any(Function (x) x("Amount").toString.Equals("0")
Select d).CopyToDataTable

Regards

1 Like

@pravin_calvin How to use it? Now show error.
Data table from read range = dtOrig

Hi @fairymemay

Provide me sample input file that you have posted as screenshot, I will do some work around and provide you a xaml

Regards

Hi @fairymemay

dtOrig is the data table from read Range!

Regards

@pravin_calvin File input as below.
Book5.xlsx (8.8 KB)

Hi @fairymemay

Refer this Workflow using Filter DataTable

Demo1.zip (61.0 KB)

Hope it will works

Regards
Gokul

1 Like

@If I want write in same sheet.

How to apply it?

In the Write range Give the “Sheet1”

Regards
Gokul

hi @fairymemay

Refer to the xaml below using LINQ expression and write it in a same sheet!

Main.xaml (5.5 KB)

Regards

1 Like

@pravin_calvin Why after run it show same data original ?

Hi @fairymemay

Can you try this workflow for the exact answer

Demo1.zip (60.9 KB)

Regards
Gokul

1 Like

Hi @fairymemay

Please refer to the attached Screen Shot below!

Expression

readDt.AsEnumerable().Where(Function(row) Not(row(“Amount”).ToString.Equals(“0”))).CopyToDataTable

Result

image

Regards

1 Like

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