Speration Different Datas in Excel

Hi guys,

My excel files and there is more values how it looks.

and it should be like this (It is done by manually):

How can i do that?
I did smt but it doesn’t work.

What i’ve done already

  • First i did read range(workbook) activity and output is Excel_Datas
  • Second I build Data Table and output is Excel_AVG_Dt and i setup the column like in 2nd pict.
  • Third i did assign activity name of Excel_Avg_Dt =
(From row In Excel_Datas
Let xPrice = Convert.ToInt32(row.item("Fiyat").ToString.Replace(".","").Replace(".","").Replace("TL",""))
Let xCityName = row("Semt / Mahalle").ToString.Trim
Group row By a = xCityName Into grp = Group
Let xCount = CStr(grp.Count)
Let xSum = grp.Sum(Function (s) CInt( s("Fiyat").ToString.Trim))
Let xAverage = grp.Average(Function (av) CInt(av("Fiyat").ToString.Trim))
Select Excel_AVG_Dt.Rows.Add({a,xCount,xSum,xAverage})
).CopyToDataTable
  • After i use write range and dataTable is out_DT and with headers.

and when i run the program it gives me error “Assign: Conversion from string “75.000.000 TL” to type ‘Integer’ is not valid.”
i fixing this error actually doing in 2nd code xPrice … sentence but doesn’t work. so
what should i do? should i change the code or what i do not know any idea.

The Program aim is that i need to find avg of Each different “Semt / Mahalle” and it show to different sheet like 2nd pict.
In the 1st pic you can see the different names and some of them are same. so

If you need more info or excel file or picture etc. i can explain and share.

Thanks already.

1 Like

Hey @yigit.aybey

You are trying to find some average or what in the output file ?

Thanks
#nK