How to fill a specific column's cells

Hi all,

I need help about filling cells of a Column. I shared an excel which contains different banks and their interest rates and different compnies.

interests.xlsx (9.2 KB)

In that excel there is a “Currency” column. According to this column i need to fill “Interest” column’s cells. There will be only two rates corresponding to the currencies.

The result which i need is shown in that picture.

Can anyone help me building the algorithm?

1 Like

Hi,

Hope the following helps you.

Sample20210524-2.zip (10.3 KB)

Regards,

3 Likes

Hi @Arif_Kilic ,

Try this also without using linq: ExcelFillCells.xaml (11.8 KB)

Sample output: interests.xlsx (10.8 KB)

Thanks!

2 Likes

Hi,

I adapted your queries but the Studıo gave this error
error

Hi,

The above workflow is assumed there is single record which has interest value for each currency, as your sample file.
If there are multiple record which has interest value for each currency, can you try to modify dictRate expression as the following?

dictRate = dt.AsEnumerable.GroupBy(Function(r) r("Currency").ToString).ToDictionary(Function(g)  g.Key,Function(g) Decimal.Parse(g.Where(Function(r) r("Interest") isnot Nothing AndAlso not String.IsNullOrEmpty(r("Interest").ToString)).First.Item("Interest").ToString))

Regards,

2 Likes

@Arif_Kilic
CurrencyFilling.xaml (10.3 KB)

Check if this works for you

1 Like

Yoichi, i really apreciate your effort. i think i couldn’t adapt your queries properly.

it gave an error like that ; Assign: Collection was modified; enumeration operation might not execute.

qqqqq

1 Like

Thank you man. it works

2 Likes

Studio couldn’t load activities properly. What did you use as packages?

1 Like

latest packages

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.