How to get cell value using numbers in Excel?

Retrieve the value of a cell from an Excel file using numbers instead of letters.
I have this function, but it returns an error:
Excel.Sheet(“Hoja1”).Cell(indiceIngresosTotales,numeroColumnas)

error:
Argument ‘Cell’: BC30512: Option Strict On does not allow implicit conversions from ‘Integer’ to ‘String’. The selected value is incompatible with the property type.

HI,

Can you try to convert row index and column index to A1 style address, as the following?

strAddress = UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(c)+r.ToString()

Then

Excel.Sheet("Hoja1").Cell(strAddress)

Regards,

1 Like

Wow, I thought I was doing something wrong. I didn’t think that something so basic wouldn’t have a more straightforward solution.
I have followed your steps, and it worked perfectly. Thank you!

1 Like

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