Fill value on run time in excel

Excel before filling data:

How to fill in the value on run time in Excel.

E.g. If the input is { “1200,51.5”, “1206,5”, “1265,1”, “1206,8”, “1200,20.5” }
then
51.5 will go under Regular at C15
5 will go under Training at D15
1 will go under OT / CTO at E15
8 will go under Training at D16 ( As we have already filled at D15 above )
20.5 will go under Regular at C16 ( As we have already filled at C15 above )

The template format is fixed.

Excel after filling data:

Template.xlsx (14.3 KB)

Hi @c3f1e68294fdcf4a1f0a817ca

Try this:

arr_result = inputArray.Select(Function(s, i) New With {
    .Value = Double.Parse(s.Split(",")(1)),
    .Category = If(i = 0 OrElse s.Split(",")(0) <> inputArray(i - 1).Split(",")(0), "Regular", "Training")
}).ToArray()

Read range workbook: From C15:E100
For Each item In dt_result
dt.Rows.Add(item.Value, item.Category)
Write range: C15:E100

Read range workbook: From C15:E100
For Each item In dt_result
dt.Rows.Add(item.Value, item.Category)
Write range: C15:E100

How to impliment this?

getting this error for

arr_result = inputArray.Select(Function(s, i) New With {
.Value = Double.Parse(s.Split(“,”)(1)),
.Category = If(i = 0 OrElse s.Split(“,”)(0) <> inputArray(i - 1).Split(“,”)(0), “Regular”, “Training”)
}).ToArray()

@c3f1e68294fdcf4a1f0a817ca

Use read range workbook activity to read the excel sheet to datatable (Give range as C15:E100)

Use for each activity
Use Add data row activity and pass item array as {item.Value, item.Category}
Use write range workbook activity to write the datatable to excel sheet (Give range as C15:E100)

@c3f1e68294fdcf4a1f0a817ca

Try giving the arr_result as Object type

Still getting same error: