How to get current shet name

Hello,

i have created script in old studio UiPath version 2021.10.0 ande recently we have upgarded studio to 2025.10.0
we are continuosly getting rcp server esxcel issue.
so i am updating excel activities to new moder activites as old excel activities works under use excel file so i am trying to passs sheet name ti old activities but showing error
like below i am doing


in read range i am getting error like -

and when i ma trying to check is sheet name is proper or not using message box it is not givi sheet name

it suppose to giv sheet name right

please help me to resolve this issue

@Mathkar_kunal

you have to use CurrentSheet.Name

Also its better you convert old activities also to new alternatives

cheers

ok i will try , yes i will convert but very time consuming as there are so many.
why this rcp server issue comes any idea? it comes randomly

@Mathkar_kunal

You re using currentsheet.tostring that wrong way to get the sheet name instead of that use currentsheet.Name, created a flow for your reference, look below

If yound this is is helpful please mark it as solution.
Happy Automation

@Mathkar_kunal

Various reasons

  1. Locked excel
  2. while excel is in saving if we next activity starts it would happen

cheers

ok but excel is not locked , i tryed by unchecking save option as vell.
setting in properties is like below

can you please connect me over google meet?
@Anil_G

@Mathkar_kunal

I might not be available immediately to connect..

few things using classic and modern together also might trigger that error

alternately if excel is being interacted multiple timed with different excel process scopes

or if there are background excels that are open

cheers

ok please let me know here when you are avaiulble , we need to resolve it urgently.
by the time i will check
pleaes share meeting invite when u are availble
anything i need to chnage oin ecel process scope properties?