Not able to fliter excel


#1

I have an excel with multiple colum .I am trying to filter column as “Ccy=EUR”

I am using the datatable and select to filter

But I am getting this error


How to get the filtered excel output in a datatable?
#2

Hi,

Could you please check the add header property of read range.


#3

Hey @sampaddas

If you have already checked headers property which i assumed you have because @ddpadil here Column Name should come in the left of assignment operator not in the right :slight_smile:

@sampaddas try this and let me know :slight_smile: dtTable.Select("[CCy]=‘EUR’")

Regards…!!
Aksh


#4

Thanks aksh ! It worked!


#5

One quick question - Is there a way by which we can get the filtered data along with the ‘Header’ ?


#6

well you can

  1. First clone the datatable into a new datatable like Datatable new_dt = dtTable.Clone()
  2. Then your Database.select will return an Array of DataRows Datarow[] = dtTable.Select("[CCy]=‘EUR’")
  3. Then you can use those rows into your new_dt Datatable (having same schema) by using “Add Data Row” Activity.

For your Ref. -

  1. Then write this new_dt to an excel write range activity :slight_smile: or use output datatable activity along with writeline to see your datatable output as a csv string in the console panel.

Regards…!!
Aksh


#7

Thanks !