MOD Issue

image

I am reading all row from column one and want to use MOD and if the Value comes back as 0 I want to write true and If Its came back as 1 I want to write as False in Column B.

Column 1 is Number 1 to 100

Can somebody Please help

Hi,

Can you try the following expression in assign activity?

Left

CurrentRow(1)

Right

 (Int32.Parse(CurrentRow(0).ToString) mod 2 =0).ToString

Regards,

yes this worked but how to write the value in Column B

Hi,

We need to use Write Range activity to write the datatable to excel. Did you already use this?

Regards,

image

Is this correct ?

Hi,

It will work, however It’s better to put WriteRange after ForEachRow.
And address should be top-left corner (in general β€œA1”). Please check AddHeader option if needed.

Regards,

Thanks heaps you are a legend.
Is anyway I can change False to Failed and true to Success in column B ?

Hi,

The following will work. Can you try?

Right

if(Int32.Parse(CurrentRow(0).ToString) mod 2 =0,"Success","Failed")

Regards,

You are amazing thank you heaps

1 Like