RCP server error

Hello,

we are suddenly getting below error-

please help me to resolve this.
@ashokkarale

@Mathkar_kunal

What you are trying to iterate? If you are into Excel Process scope, most probably the file is closed while your code doing the operation.

simply i am going through each sheet in workbook


at start only it is throwing error.
as project is devloped on classic activities and excel activities are also classic.
my current UiPath version - 2025.10.0
excel activities - 2.24.4

Hi @Mathkar_kunal

I think this is a similar issue that was previously resolved: RPC server unavailable

Have a look at it and see if it assists you :slight_smile:

i checked linked but there is no fixed solution provided.
sometimes i am getting below error as well

i tried with delay also
we have changed our 4 remote admin account server names recently but did respective chnages also like reedit chnages and other automation running fine on remote admin machines

Understood - can you give more context on your process?

You are looping through Excel Spreadsheets within a Workbook. But have you opened the workbook at this point or not? And what are you doing with each sheet within the for each?

Thanks

yes i am opening first


ere you can see i have report excel and it has 4 sheets, if done written in each line then i am not working on that like and if failed then downloading report

May I ask you to try use the Modern Excel activities. It also gives you the ability to kill any existing Excel processes that may be open:

This might be causing the RPC Server issue - it’s usually to do with closing Excel gracefully before using it again.

yes but it is already built script and big one so impossible to make it again with new activities of excel any other possible solution?

Another solution would be to add a “Kill Process” activity just before using Excel sheets. Make sure to add the “EXCEL” in the process name. Then perhaps use a 3 second delay and THEN start your Excel Application scope.

@Mathkar_kunal

  1. Is the excel process scope inside the loop or outside loop?if inside can you move to outside the loop as the file is same and sheets are the only ones changing
  2. Try to kill excel before starting the process and check ..even in background
  3. Also classic activities would work inside modern excel scope as well so try to change the excel process scope to modern and check…you need not change other activities

cheers

ok as you suggest i will try to add excel application scope (clssic) inside excel process scope (modern)and try.
plesae update any setting i need to do here in properties for excel process scope


and i ma using

to iterate through sheets. if i use only escel process scope (modern) instead excel application scope (clssic) then it will not work
@Anil_G @JarrydScott @ashokkarale

  1. Under “Existing process action” - select “Force Kill” - That will terminate any existing Excel processes before the scope opens a new one.
  2. Under “Launch method” - select “Application”.

i have done all.
now i am continously getting error here in write cell where i am writing formula

@Anil_G @Jarry @ashokkarale

@Mathkar_kunal

It’s better to shift your classic logic to Modern Excel activities and check. Combine could lead to more complexity.

Also to isolate the issue, try recreating the issue in a new separate workflow.

now i am using modern and getting this error
pleaes help

@ashokkarale @Anil_G

“=SUMIF(S2:S”+TableRowCount2.ToString+“,”“”+ProjectKey+“”“,C2:C”+TableRowCount2.ToString+“)”

@Mathkar_kunal

Check what’s the value of TableRowCount2. Also try the same formula manually in excel and see if it’s calculating correctly.

value for tablerowcont2is correct and iyt was working previously suddenly this issue camefor few it is working and suddenly for any random count giving error
you can see below image

for few rows writen i column t and suddenly this error

@Mathkar_kunal

Is it only happening for value on and beyond 21?

no its randome,sometiems for 13,16 ,21