Support > Forums > OpenBots Studio > Excel Get Range & Excel Get Last Row
I'm trying to get the last row of an excel sheet.
In the Excel Get Last Row Index, I'm using a variable type of Int32 named vLastRow.
When I try and call that vLastRow in the Excel Get Range using "A1:E{vLastRow}", every time I receive the error message:
Message: 'Cannot convert type 'string' to 'object[,]'']
If I manually enter a number for E, this works fine. Say - "A1:E255" this works fine, but I want to dynamically set this.
I'm not sure what I'm doing wrong here.
Any advice out there on this?
This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...
That worked, thank you!
Hi Dustin Krick,
Thank you for sharing your query.
Actually, the error occurred because of you entered a variable inside the string basically it's syntax issue. Can you please try to use range like that "A1:E" + vLastRow
Let me know if it's work for you.
Thanks.
You are not authorized to reply, please click here to login and add your reply to this topic.