Detailed functional knowledge needed

This is a sample conversion function listed,that is used to find last column and read its values.

I would like to have a understanding how these conversion functions really works array. cast,+65 ?? .

having the understanding to use will help to manipulate/use them in other automations.

array.IndexOf(firstRowValues.ToArray.Cast(of string).ToArray, “Total”)

convert.ToChar(totalColumnIndex + 65)

Hi @aksnaveen

The IndexOf method is used to find the index of an object in the given array. This method takes array as first parameter and the object to be searched as second parameter. It returns index of the object in the array as integer.
More can be found here.
Here, the array “firstRowValues” is being converted (casted) to array of strings. It might have been an array of integers or some other objects, hence being converted to array of strings before searching index of a string “Total”

And for the second line, we are converting the ascii value to a character. convert.ToChar(65) return us the character ‘A’. From what it looks like, the totalcolumnindex might be index of column in datatable and the statement returns the corresponding column character for excel operations, starting from ‘A’.

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