Excel: The process cannot access the file, because it is used by another process

Hello Folks,

I am doing a simple application where I am reading from an excel, storing in a data table and writing to another excel.

I am getting everything until I write to data table. The moment i access to write to the second excel, i get the error. Should i close the first excel before opening the second one? Could the issue be because of concurrent access (if any)?

Codes attached.

Thanks a lot.
Patch 1.zip (17.0 KB)

1 Like

Hi @Joshikumarav,
Mistake
Inside excel scope you are using workbook write range activity.
That’s the error.
you need to use corresponding write range activity for excel application scope
excel1
or
Use this activity only for writing
workbook

Regards

3 Likes

Perfect. Thanks, mate.

What I learned was, we don’t need application scope when we have to write an excel. Use the Write Range directly.

Thanks
Joshi

3 Likes

thanks it was helpful