Mathematical Operators in DataTable

Hello,

I have a DataTable with three columns. In column 0 and column 1 there are numbers as integers.

I want to add column 0 with column 1 and write the result to column 2.

I write this in the activity Assign:
var_ExcelDataTable(0)(2) = var_ExcelDataTable(0)(0) + var_ExcelDataTable(0)(1)

Unfortunately, the mathematical operator is not used.

Is there a solution?

1 Like

You were almost done
Kindly try with this expression
var_ExcelDataTable.Rows(0)(2) = Convert.ToInt32(var_ExcelDataTable.Rows(0)(0))+ Convert.ToInt32(var_ExcelDataTable.Rows(0)(1))

Cheers @Kytyzow

1 Like

Thanks,

var_ExcelDataTable.Rows(0)(2)) = Convert.ToInt32(var_ExcelDataTable.Rows(0)(0))+ Convert.ToInt32(var_ExcelDataTable.Rows(0)(1))

this works fine :slight_smile:

1 Like

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