hi everyone need some helps here :))
So basically i have some files i would like to update on the excel sheet shown above.
How do i make UiPath read the file name and go the the excel sheet accordingly to update??
The file name and excel tab might not match exactly so what methods i can use ?
I believe you are using older version where it is throwing errors while opening the xaml
Here is the flow you can try in your studio
Use Assign activity to get the files from the directory
Here GetFiles is an array variable and YourPath is the path of the folder where you need to read the files
Use For Each and Type Argument as String and pass the Get Files, Inside For Each
Place the excel Application scope and declare a variable for workbook as wb for example, Inside that place For Each and write as wb.getsheets
inside the ForEach you place a IF Condition and write as item.ToString.Equals(“Payment”)
Inside IF Condition Place Read Range and pass the name as “Payment” in SheetName and declare a datatable variable
Now outside the IF Condition Place For Each Row activity and pass the datatable variable
hi thank you so much for ur help! but i do not want to create a new excel workbook to update instead i actually want to update on the excel sheet under column “name” base on the file name i downloaded.
Step 1 : Read update file. Which you want to update No. , Name, Ver in outputDT
Step 2 : getFiles = get file name with extension using assign assign activity.
Step 3 : Use for each activity
Step 4 : Use If activity to check file name contains “PACK” inside for each
Step 5 : Get sheet name
Step 6 : Get version and update No., Name, Ver to your expected Data table using add data row in outputDT.
Step 7 : Write excel file.