Calculate average of similar rows cell in Excel

hii,
Below is the error on running your workflow i got:
Assign : Column ‘Header1’ does not belong to underlying table ‘’

and i am getting this error
Assign : Object reference not set to an instance of an object.

@somya177

make sure you have Excel path updated in excel read range activity.

Hii,

I used Read Range activity of the workbook .Updated the path and now I got this error.’
Assign : Column ‘Header1’ does not belong to underlying table

any suggestion on below query

@somya177

make sure the column name in the excel input file, in the example i provided the column A i named as Header1

actually the excel is like this:
From “Heading1” column Bot has to remove “=” and fetch only the chars and no sign and for both a1 and a2 it has to calculate the average values of the values present in Column “Heading2”
image

@rajeshprabhu_gp @SaranyaKishore…please help !!

Hi,

I have just tried out with sample data. You can use this for reference.
Average.xaml (14.7 KB)

can u share your sample data as well…

Please find it.
AverageValue.zip (8.4 KB)

Hi Saranya,
in my scenario,header1 contains multiple a1,a2,a3,…ath…the logic that u have provided is just for a1 and a2 to add in the collection…Please suggest how we will calculate if we have multiple time a1,a2,a3 and their corresponding values in header2

Hi,

In this place of code, you can replace with Switch Activity if the number of header columns are known.

image

Thanks

thanks

how can we write it into separate excel instead of write line??

Write range or Append range can be used.

i did that…but it’s throwing error…when i used write range as row.Item(0).tostring+"-"+total.Tostring
that it cannot be converted to datatable

Write cell can be used in that case.
Even the values can be stored in the datatable using assign and further Write range can be used.

its giving error that string cannot be converted to dataTable when iam using assign to put values in dataTable

Please find the below example to edit the values in datatable.