I get identifier expected error in read cell activity in excel. The read activity is within a loop. It is bizzare that the first instance ( i=1 ) from the excel is read properly, however all subsequent instances throw an identifier expected error. My read cell ouput is stored in a Generic Variable. The cell which the code reads from Excel has a Vlookup formula.
Welcome to UiPath Forum!
Could you post more details, such as a screenshot of your workflow?
Image on top is snap of excel. Step 1 check if value in column F is “non” . if Non, read values in corresponding column B , C , D, E .
the snap left bottom stores value read from column F in variable oui_non, then it starts reading columns B C D E. The coulmn D whose value is stored in Modèle (pic bottom right). It contains RechercheV ( French for Vlookup) in it.
The code runs first time i.e for first time it reads the “NON” value. For the second time, the code throws Identifier expected error when it reads values in column D.
Hope it helps !
Which activity throws the “identifier expected” error?
It seems like running this project in a Debug session would help. Please go to the Execute tab on the ribbon and run the project by simply clicking the Step Into button:
Then you will get a window on the left with all variables and their values. Continue clicking on Step Into and watch if the variables have desired values. It should be easy enough to spot where it goes wrong. My assumption is that at one point one variable will have improper value that causes the error.
Thanks, @loginerror the variable that throws error is “modèle”. Read cell activity reads its value from excel. The cell in excel has Vlookup formula. When I just type in value, without the Vlookup formula, I dont have this error.
I’m trying to reproduce it, but having some issues (it works).
Could you let me know what is your Excel activity package and the Excel version? For me the Read Cell works correctly and reads the value as such:
My Excel activity package version: 2.5.3
@loginerror I have my readcell in a loop for i=1 to 25; What is funny is that it is not the first instance that gives error but the second time the loop runs. And it is the same formula in all the cells.
It’s strange indeed. This is why I would suggest to check if the value of i gets properly incremented through debugging.
Also, please give it a try with 2.5.3 (although I’ve just checked and it works for me with a downgraded package as well).
Last resort would be if you could share a zip with the project that gives you the error (please remove any sensitive information from the files) and we could try debug it further.
thanks will do as I get cases after vacation