@Palaniyappan - Hello. Would you have time to answer this issue I am encountering? “‘Directory’ is ambiguous, imported from the namespaces or types ‘Microsoft.Graph, System.IO’.”
How to remove this error message? Apologies, I’m a bit of a rookie in UiPath. Please help.
Ohh, didn’t think it was just that easy. Thanks mate.
Hello, sorry I’m still having an issue getting the file in the network drive.
This is the Sharepoint network drive >> Test_Current (\sharepoint\rpa) (Z:)
I am trying to get the Excel files inside it but to no avail.
With this code, UiPath says Assign: Could not find a part of the path ‘Z:\Test_Current’.
System.IO.Directory.GetFiles(“Z:\Test_Current”,“Customer_“+CurrentDateMinusOne+”.xlsx”)
What could I be missing here?
After passing the Get Files, Excel file won’t open. Please help. I’m getting hopeless outta here.
Ohh sorry. I just figured out that the getfiles was not the issue but the Excel Scope.
The file from Directory.GetFile(GetSheetWorkingFile) is not opening in Excel Application Scope.
In the ouput message, bot is opening the excel file from different path. Not the Z path.
Please help. Huhuhu
Here it is:
Excel Application Scope: Failed opening the Excel file C:\Users\rpa\System.String. Possible reasons: the file is corrupt, the file is already used by another process or you don’t have permissions to open the file.
Excel application scope should get the file from GetSheet1WorkingFile is it?
Fine
Before excel application scope use a KILL PROCESS ACTIVITY and mention as “EXCEL” in ProcessName property
And the use excel application scope
Cheers @redbee
@redbee
Please share the correct workflow to detect the error this workflow is not contain anything.
Use process name as string “EXCEL” in kill process.
This will work!!!
This error raises due to wrong input path of excel file.
Please check once the path using debugging then correct it will work perfectly.
Cheers @redbee
If anything still not resolved please feel free to discuss with me.
Thanks & Regards,
Paras
You were almost done
Mention as “EXCEL” between double quotes in the same ProcessName property
System.IO.Directory.GetFiles(“Z:\Test_Current”,“ Customer_“+CurrentDateMinusOne+” .xlsx
This returns an array.
You should assign to a string variable as
Excelfilepath= System.IO.Directory.GetFiles(“Z:\Test_Current”,“ Customer_“+CurrentDateMinusOne+” .xlsx)(0)
And pass this excelfilepath variable to your excel scope
Yah that could be the he reason either
Kindly mention with index position and try once
I didn’t see the expression @Sourav_Anand based on the error I was suggesting that buddy
Sorry what does the (0) do on System.IO.Directory.GetFiles(“Z:\Test_Current”,“ Customer_“+CurrentDateMinusOne+” .xlsx)(0)?
Thank you so much for your inputs. Apologies as I am just starting learning UiPath Cheers mate