Activity Excel Scope does not end

When Excel scope activity is used inside loop it does not end so that next loop it fails. any idea?


Hello @Alain_Voorspoels,

Have you tried closing the workbook on each iteration? You can get the workbook from the output parameter Workbook of ExcelApplicationScope activity



Thanks. I thought about this solution but it is not the normal behavior because help of this activity says “When this Activity ends, the Workbook and Excel application are closed”.For me, it’s a bug!


why not use loop inside excel scope?

Again this workaround does not fix the bug!

or you must change help for this activity to be in phase with the code :slight_smile:

i don t really understand the problem here.
you have a loop (lets say for each item in an array)
and inside this loop you have an excel scope activity that opens an excel file
in do (for the excel scope) you write the item`s name in a cell
for each loop/item you ll open the excel file, do the write cell and close the workbook
then again and again…
the loop will continue until all the items in the array are consumed, then the workflow stops.

It also says the following:

So, this is a sheet :frowning_face:
Whatever, the code of this activity is not in phase with functionality == BUGG

For each loop, I use Excel Scope to use Write activity in order to write data in it.