I need to perform substring activity to retrieve the number as per highlighted in yellow.
I used log message and it seems like I manage to extract out the numbers that I need.
Next, I will need to paste the numbers into my excel file into column Y (under AMT number column). This file has hundreds of line items, hence the expectation is to ensure every number able to paste accordingly into the right line.
However, it seems that I have an error showing below. When the robot runs, the excel file is not even open.
Do i need to build data table in order to ensure all numbers paste accordingly? Or i can directly use below assign activity. Is this the correct way to do this?
dont use the workbook version of write cell , as it makes the robot open and close the workbook multiple times since its in a loop, you got that error because robot tried to open the workbook but it was opened already.
Instead you should use excel application scope outside of your “For each row”, then pass in your excel path into the excel application scope, this way your excel is only opened once
Then for “write cell activity”, use the excel version instead of the workbook version
Hello… Thank you for your guidance. I have update accordingly, however now I have got this error message. Do you have any suggestion on how do I proceed from here?
Hello, thank you for your response. Appreciate it. Here what I have done. As per advice by Jack Chan, I should put the excel scope outside of for each activity. However i am now getting below error. Kindly help to advice on this please. Thank you.
Did u check whether there is any rows in dtAMT like as @Shivam_Kushwaha said
Please try dtAMT.Rows.Count to check the no of rows in dtAMT
before using for each row
click inside your for each loop in sequence 4, then go to variables and delete the dtAMT variable.
Then go back to sequence 3, click inside variables and check if dtAMT exists, if it does it means you had 2 dtAMT variables, and you just deleted the duplicate one, you should then change the scope of the one in sequence 3
I have checked there is only 1 variable for dt AMT. Somehow, i tried to close my UiPath application and re run again~ it seems to work fine now. I have done no changes as per my last update. Anyways, it works. Thank you for all your suggestion. It really helps.
However now, seems like when it paste it paste into the same cell. I have created a new variable called ‘celltopaste’ as below. The idea is to paste the AMT number into column Y, starting from Y2 till the end of the rows. Any suggestion on how to resolve this? Kindly help to advice. Thanks.