Write range activity printing "System.data.datarow in .xslx file

Hi All,

I am trying to filter certain data extracted from webpage adding it to a dataTable and the writing the whole data table in the .xlsx file.

But, I am getting the data System.data.datarow in excle file, please refer the below screenshots:


Hi @Shruti_Rastogi

Please try dtFilter.ToString

1 Like

@Shruti_Rastogi i don’t know why you use add data row.
if you use fillter data table activity it directly gives you output datatable and there you can use write range.
-but if use datable.select expression it gives you output as datarow
for that at last you need to add .copytodatatable.then it will work try to work on this let me know if any thing goes wrong.

compilation error

What is the data type of dtFilter?
I am assuming it is of type DataRow.


Could you share your .xaml file here?

@Shruti_Rastogi write range only take datatable only it won’t take any type other than this.and one more thing can i have a look how you filter the datatable.

Hey can u change the value dtFillter to dt_WorkItems once bcz ur passing data row variable in place DataTable in write range i think


plz see the code

its a data table only. I have used another datatable as it was showing row already belongs to another data table

Excel_Practice.zip (32.0 KB)

@Shruti_Rastogi I didn’t find any filter expression or fillterdatatable activity in your screen shot.
you scraped a data from a website and stored it in a datable and now you are filtering the datatable this is what your query right and if that is only your query you no need to use for each row.
you can simply get by filter data table activity and there is one more alternative to get is say your output data table is dt1 then you can give like this dt1.select("column name=‘value’ and column name=‘value’ ").copytodatatablethis gives you output as datatable and then use write range it will work as expected.

I have used IF…please refer to the .xaml fileExcel_Practice.zip (32.0 KB)

@Shruti_Rastogi Main.xaml (8.2 KB) just go through this it will give you output as expected.

@Shruti_Rastogi did that worked.

pass the value as above u ll get the output according to ur flow

There is nothing wrong with add range.

You are literally saving the datarow as “System.Data.DataRow” into the datatable. This is because you added data row to dtFilter using “{item.ToString.ToString}” as arrayRow. You may try to use {item(“WIID”).ToString} instead.
If you want all values, use {item(“WIID”).ToString+item(“Status”).ToString+…}

You may refer to my attached file.Main.xaml (12.2 KB)

Thank you, It worked,

Also, I want to filter the data by if wwhere the WIID is greater than 700000.But, I am sure how to use it in strings
I thought of using it like
item(“Status”).toString.Equals(“Open”) and item(“Type”).ToString.Equals(“WI4”) and
(item(“WIID”).ToString.Equals(“7*”) or item(“WIID”).ToString.Equals(“8*”) or (item(“WIID”).ToString.Equals(“9*”))

But, this is not working.

1 Like

You may use this:
double.Parse(item(“WIID”).ToString) > 700000


1 Like