I am trying to build a RPA with a for each file loop on excel file to get values from particular cell.
However, the sheet name is dynamic for each excel file, but all the excel files only contain 1 sheet at all.
May I know how to write the command to get the exact cell value from the sheet for each excel file? (I am using the excel process scope for processing)
Many thanks in advance !
Welcome to uipath forum
Hope the below steps would help you resolve this
this can handle one sheet or multiple sheet
Use a excel application scope and pass the filepath as input
From that scope itself we can get a output variable named out_workbook which is of type workbook
Now use a FOR EACH activity where pass the above variable out_workbook.GetSheets as input
And change the type argument as string
In property panel
Inside the loop use a READ CELL activity where mention the sheet name as item and mention the cell position from where you want the value and get the output as string variable
Try using a message box if you would like to see the sheet names
If there is always only one sheet in each Excel workbook, the following will work.
Thanks, guys !
Both can work !
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.