Filter datatable

datatable

#1

I have datatable with columnames like[01-Jul-2017]till [30-Jul-2017] and additional columns also there .i want to filter a datable with current date and additional columns .i got current date using current date activity but i don’t know to filter the datatable.


#2

You can Use Select method for filter the data table

For example

Datatable = VarDatatble.Select(“ColumnName=’”+CurrentDate+"’").CopyToDataTable


#3

i am getting one or more validation errors


#4

can u attach the screen shot or workflow
Its working for me


#5

Datatable


#6

u can use the currDateValue in Write range activity

Attach u r workflow


#7

Don’t use “Datatable=” in Write range activity


#8

Still getting same error
In writeRange activity in datatable field i have given this:
currDateValue=dtRoster.Select(“ColumnName=’”+CurrentDate+"’").CopyToDataTable


#9

Could u please attach u r work flow


#10

test.xaml (16.6 KB)


#11

Excel file?


#12

test.xlsx (10.3 KB)


#13

It is better practice to either create a new datatable or remove rows that you don’t want from the existing datatable. Then you can simply write your new or updated datatable to the Excel file.

The way you are doing it you have no idea what the problem is, how many rows you are exporting or if you are selecting the correct information.


#14

Thank you