Increment cell index in excel

How to increase the cell index value vertically so i can increment from G6 to H6 and so on …

Hello @Mr.StarLord_AO

You can save the keep the column headers in an array and you can make a loop using for each.
So here row number will be static and you need to replace the column name with a variable. for eg:

for each item in arrayvariable
{
item+“6”
}

Those are not column headers actually…cell index in excel …

How can we achieve like z6 after that AA6 ,AB6

I want know this kind of increment for the cell indices.

The main building block we can do with following:
grafik

Splitting Letter and Number for the calculations we can do with Regex
grafik

1 Like

it is depending on some different factors. Let’s scope each topic to only one case, so other researchers can easier find solutions for their similar cases. Just open a new topic and if possible also share some sample files with us. Thanks

Can you please share the xaml for that

Can you please explain the solution

Hi please explain this expression I really appreciate

it is a helper function which we can use to map the excel column letter to the corresponding index and vice versa

Hello @Aleem_Khan

So It is a kind of expression and you able to understand what it is doing with the name .

ColumnLetterToColumnIndex -This will give you the column index based on the letter
For Ex : Column A and its index is 1 and so on
Input: A
Output: 1
ColumnIndexToLetter -It is the vice Versa of above it will give you the column letter based on the index
For Ex: Index 1 and it will you A and so on
Input: 1
Output: A

And he used regex for getting the other column address
For Eg:
Lets assume you need to write the data in cell C2 and D2
- You have used write cell and wriiten in C2 with (…ColumnIndexToLetter(3)+“2”) in cell
- Now you have to write the data in D2
you can try something like this in cell value
Uipath.Excel.helpers.excelUtilities.ConvertIndextoLetter(Uipath.Excel.helpers.excelUtilities.ConvertLetterToIndex(“C”)+1)+“2”

Regards
Sudharsan

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