How to increment cell automatically for writing text in one by one cell in workbook?

How to increment cell automatically for writing text in one by one cell in workbook ? Note : this is only for workbook not for excel . so plz do not consider excel application scope etc. thx in advance for proper solution in steps and example .

@Bh_P

I beleive you are using a for loop…

For loop has an index property…assign a variable to it and then use that in the cell value "C" + (Indexvar+1).ToString for the first iteration the cell value would be C1 ,C2 and so on…added 1 because index starts from zero

If you need row incrementing then use as below

UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(indexvar+1) + "1" this will be A1,B1 and so on

Hope this helps

Cheers

Thx a lot for the correct solution and quick reply.

1 Like

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