Error with range parameter in read range activity when using string and Excel.Range

I’m encountering an issue when using the Read Range activity in UiPath. I have a range parameter where I am trying to use a string value like "B1:B1000


" for the cell range. However, I’m receiving an error message stating:

“BC30512: Option Strict On disallows implicit conversions from ‘String’ to ‘IReadRangeRef’. The selected value is incompatible with the property type.”

I attempted to define a variable of type Excel.Range to assign the range value, but I’m still facing the issue.
Could someone help me understand how to correctly define and use a cell range in this activity?

@alpagucelik

Welcome to the community

you have to write like this

Excel.Sheet("Sheetname").Range("B1:B1000")

also using a use excel file activity is mandatory for excel activities

cheers

Hi @alpagucelik

No need to change the excelRange variable to RangeValue datatype just change it to String.

Then give Range in Read Range as below,

Excel.Sheet("Sheet Name").Range(excelRange)

Hope it helps!!

1 Like

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