System.runtime.interopservices.comexception: document not saved

i get this error,
any idea what error is this, and how to resolve it?
In my powerful laptop the flow work’s completely without issue, while in weaker pc desktop i get the error below:

my flow have:
1 parent excel app scope & 1 child excel app scope inside for each loops.
the process take hours because write in hundreds of excel worksheets.

^ should i tweak the & how:

  • instance cache period property?
  • existing workbook property?

Hi @wija ,

Could you let us know what are the For Each loops performing ?

Also, A Screenshot of the implementation could help.

But as you have already mentioned it does work on another laptop, we do have our doubts on the machine that you are checking doesn’t have the necessary requirements to execute the automation efficiently, Could you also provide what are the differences between the systems used?

So in the end,

I rethink & revise my flow logic to make it more efficient.

Now both excel app scope are separated from each other so i can put kill process excel before each excel app scope + i put retry scope in each kill process excel & each excel app scope, so when this error occured retry scope will retry it until 15x

& both excel app scope are inside same for each loops, so when the retry scope kicks in, it will just retry the kill process excel & excel app scope. The for each loops don’t need to be retried again.

^ with this i handle the error in weaker PC desktop, while in my powerful laptop don’t need the retry scope & kill process excel.

(The excel have hundreds of worksheet, so the excel file is heavy to load & need fast cpu)

And i have 1 more left idea to make the flow more efficient & faster:
the second excel app scope is possible for me to change it to workbook activity. Because excel app scope have to load the heavy excel first before executing the child activities.
^ will try this as well tomorrow, going to sleep now

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.