How to find the previous cell address

I need to find the previous cell address
Foe exampleinput :AB NEED to get as AA AS OUTPUT
B NEED TO GET A as output

@sruthesanju

Try below expression.

        Int currentIndex = UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnLetterToColumnIndex("AB")
         previousIndex = currentIndex - 1
         String previousLetter = UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(previousIndex)
1 Like

As an alternate have a look on these activities:
grafik

Get Column Index you will get an integer (the position) - myPos
With get ColumnName you get the new ColumnName when using myPos - 1 as Parameter

how could I use this code using invoke code activity please share any workflow

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