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’.