Problems with Write range

Hello friends,
I’m developing a process in which I have to update an Excel file for each transaction.
At the end of each transaction I’m saving the output of the transaction in an output file, using Write Range activity, in Workbook Section.
Unfortunately when processing the second transaction, I get the following error:
The process cannot access the file ‘----’ because it is being used by another process.
Can you please help me?
It’s very urgent
Thank ,
Camilla.

2 Likes

Hi @CamiCat

Did you try to kill the process EXCEL before starting to write?

You can use Kill Process Activity and pass ProcessName as “EXCEL”

Thanks,
Prankur

2 Likes

Hi @CamiCat

Have you tried to use write range inside an excel application scope?
This way the excel will be automatically closed once you’re out from the excel app scope.

Regards,
Reda

1 Like

Thank you @PrankurJoshi.
I’ll try your solution and let you know.
Camilla :slight_smile:

Thank you so much @reda.
I have already done in this way but it gives me the error “The range does not exist” :frowning:
Can you please help me?
Thank you,
Camilla.

Unfortunately it does’t work.
I should use Workbook Write Range beacuase it’s more efficient.
Can you suggest me another way so that I cannot get the error:
The process cannot access the file ‘----’ because it is being used by another process.?
Thank you,
Cami

Close the excel sheet and then try to run the robot in uipath, it will work.

1 Like

Hi @CamiCat

I think the problem with that is you’re trying to write a generic value to the excel sheet try and convert it to string before writing it.

Regards,
Reda

1 Like

Unfortunately it does’t work.
I should use Workbook Write Range beacuase it’s more efficient.
Can you suggest me another way so that I cannot get the error:
The process cannot access the file ‘----’ because it is being used by another process. ?
Thank you,
Cami


Can you please help me?
Thank you,
Cami

Hi @CamiCat , I have similar problem with you. After tried several steps, I finally found the solving.
I got the problem when I used Write Range from Workbook Activities. Actually there are 2 Write Range activities. You need to use Write Range from App Integration > Excel > Write Range. Then my problem is gone. Hope it helps :grin:

5 Likes

Hello @marzuki.
Thank you so much for your advice.
Should I insert a CLose Workbook Activity?
Thank you,
Cami :slight_smile:

Thank you!!!

This was awesome, it worked.

Hey, what if i can’t find the write range of Excel. I can find every other excel activities but write range. Is there a certain package I need to download?

Thx, Carl

after turning off “modern design experience” in project setting, the “write Range” appeared for me.