Hi All,
I am using ‘Excel Process Scope’ in my project and getting an error about ‘Excel Read Range’ activity on playing ‘debug’ as-
26.0.181-cloud.21801+Branch.release-s181.Sha.5144f3c3cfd2190f572dba78bd7a3b38929f06b5.5144f3c3cfd2190f572dba78bd7a3b38929f06b5
Source: Write Range Workbook
Message: The process cannot access the file ‘C:\Users\Dell\Documents\7 Robots\Robot4_RealEstateScraping\PropertyListing.xlsx’ because it is being used by another process.
Exception Type: System.IO.IOException
in Main.xaml
at WriteRange “Write Range Workbook”
at Sequence “Do”
at ExcelApplicationCard “Use Excel File”
at Sequence “Do”
at ExcelProcessScopeX “Excel Process Scope”
at Sequence “Do”
at NApplicationCard “Chrome Zillow Real Estate, Apartments, Mortga”
at Sequence “Main”
at Sequence “Main Sequence”
at Main “Main”
System.IO.IOException: The process cannot access the file ‘C:\Users\Dell\Documents\7 Robots\Robot4_RealEstateScraping\PropertyListing.xlsx’ because it is being used by another process.
at UiPath.Excel.Activities.WorkbookActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
I think this is due to non-activation of my MS Office.
this error isnt caused by office activation. it happens because the excel file is already locked when write range runs - debug mode make this more common since the excel process scope kepps the fike manager. Make sure only one excel scope is using file close any earlier access or switch to webhokk sctivities if you dont need the excel app Wps office wont fix it ui path relies on microsoft excel for excel process scope
Hi @musmanq
Please kill the excel process for that user before that activity so that it can kill the other instance of excel opened.
and also disable the onedrive/sharepoint sync whenever you are performing the excel actions.
first issue you are using a workbook read range activity inside an excel process scope…you need to use excel read range…
second thing ideally valid license only would work..but looks like use excel already worked so that must be working..change the workbook read range to excel read range
alternately use workbook read range and you can remove excel process scope and use excel file both
even for write you have separate for workbook and excel
Please check if excel is open somewhere , if yes then try to close and restart the UiPath,
And try to kill excel before reading and I saw inside the excel scope you are using workbook activity that also causing issue just try to using excel activity and if possible please send out the xaml will check and provide u solution
Cheers
@nishiijain2000
I have checked opening of Excel from ‘task manager’, that was not opened.
Also, using ‘excel write range’ in ‘excel process scope’ was throwing the same error.
Thanks for your help.