Attach already open excel file instead of opening every time - file is too big and takes awhile to load


I need to open an excel file and read/write certain info in it. I’m using an excel application scope to do it. However, the issue is, it opens the excel file every time which takes about 2 mins. My process requires to go into the excel file around 50 times a day so this 2 mins adds up.

Is there a way to perform excel application scope activities in an already open excel file? So it does not need to reopen the excel file each time? Currently, the users just keep the excel file open on their desktop all day.

If your process is continually running you can pass out the workbook variable to keep the file open.

This can then be used whenever you require it.

Pass out the workbook variable? What do you mean? Just set an output variable? What do I do after that? How do I call it again?

At the start of your process, just set an output variable on the excel application scope with whichever file you want to open, that creates a variable of workbook type that stores that particular workbook instance - you can then use that within any other additional workbook application scope (instead of passing in the file path - you pass in the workbook variable to ExisitingWorkbook)

You can then use Close Workbook activity at the end of your process / end of the day


So I stored it as an output variable but it still closes down after the excel application scope. How do I keep the excel file open after the scope?

If you need to keep reading and writing in this excel file and it is in a simple network volume, i guess maybe see if you can use the activities inside System - File - Workbook instead of using an excel scope…

simple network volume?

Its a ~30MB file with maybe 50 macros in it.

network volume is where i assume the file is stored, not about its size or complexity :slight_smile: