What the option InstanceCachePeriod is used for in the excel application scope

Hi All,

I have read the uipath document many times about the property of instanceCache in the excel application scope. I kind of understand the explanation of the document. but I don’t know why uipath team design this property for what reason. In what scenario that I could use InstanceCache properly.

Hi,

In older version, there is no this property in ExcelApplicationScope, and it’s added to mitigate trouble with “close and immediate open excel process” (like the following workflow) in Excel package 2.9.

img20220314-2-2

FYI, in ModernExcel, as we can use ExcelProcessScope to control open or close process, there is no property like InstacnceCachePeriod in it and UseExcelFile.

Hope this helps you.

Regards,

2 Likes

Hi Yoichi,

Thanks for the reply.

I have experimented on what you’re saying “close and immediate open excel process”. It’s just look like exactly the same with your workflow, and I set 10000(10sec) for instanceCache, however, there is no error occur. so that why it make me so confused

Hi,

The official document says as the following. So I guess if we set long duration, next file will be opened completely, before close previous one, then there is no error.

this prevents errors that can be caused by the Excel process shutting down while opening the next file.

Regards,

Hi Yoichi,

I don’t know if I can understand in this way, please correct me kindly if I’m wrong.

If I set InstanceCachePeriod = 500ms, then the 1st excel process will stay alive in 500ms after all child Activity are finish in excel application scope. The workflow keep going and just open the next excel application scope in timespan 500ms from 1st excel process. then it will cause some kind of error, right ?

PS : I have set InstanceCachePeriod shorter but it’s hard to reproduce the error.
So I think it is kind of random error.

Hi,

As UiPath guys try to prevent this error and might have added any other measures, it might be difficult to reproduce this error. In addition it might depend on environment such as PC spec, excel version etc.

If we want to check behavior of this property, we can check it excel.exe process disappears, using TaskManger of OS. For example, set 5000msec at InstantCahcePeriod proerty and put delay activity with 10 sec just after excel application scope, as the following image.

Regards,

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