Loop on Columns?

Have you considered using a DataTable to store the values to a DataRow, then you can write or append to the dataset. It might be simpler that way. It also gives you the ability to use index number to reference columns.

However, if you are wanting to increment by the column letter(s) using Write Cell, you will need to convert a numerical value to the letter. Since, this can go to AA and beyond, you will need to use a modulo method to calculate. Check this post for that calculation: UIPath Type Into Excel using alt for formatting issue - #2 by ClaytonM

Regards.