I need to be able to specify a starting point in my spreadsheet.
Therefore, I am using an Inputbox to ask for the starting row and asigning the input to the variable “activerow”. The column will always be A. My target is the Read Cell Value activity.
I have tried [activerow]A and too many other variations to recall.
Hey @dhtguru
If you’re using the Read Cell Value activity and want to build the cell reference dynamically with a variable, you can do it like this:
"A" & activerow.ToString
So if activerow = 1, the result will be “A1” - which is a valid cell reference.
You can increase this value in For Each loop.
Just make sure this variable is of type Int32.
Depends exactly which activities you’re using. With the old-style Workbook activities it’s just a string ie “A1” “B2” etc. But with the newer Excel activities it’s an expression. Show us your code so we know what you’re trying to do.
By the way, why not just read the sheet without headers, starting from A1, and use code to figure out where everything actually starts?
I must be doing something wrong. I have the variable set to Int32, entering “A” & activerow.ToString in he Expression Editor of Read Cell Value; however,
I am getting the error message Argument ‘Cell’: BC30512: Option Strict On disallows implicit conversions from string to ‘IRefCellRef’. The selected value is incompatible with the property type.