eScript: After releasing an Excel object that created a file, Clib.remove() cannot remove this file. (No error message occurs.) (Doc ID 1991261.1)

Last updated on AUGUST 24, 2016

Applies to:

Siebel CRM - Version 8.1.1 [21112] and later
Information in this document applies to any platform.
""Checked for Relevance on 25-Aug-2016""

Symptoms

Customer Statement:
--------------------
Scenario:
A script invokes Excel via COM to create a new file. Then the script quits Excel and attempts to remove the file via Clib.remove(fileName) or via Clib.system("del " + fileName).

Issue:
Removing the file fails in a random manner.
However, no exception is raised when the remove fails. The script does not enter the catch block.

What works:
Without the Excel part of the code, the script is able to remove dummy files that it cretated by itself.


Environment:
--------------------
Siebel 8.1.1.5 SIA [21229].


Expected Behaviour:
--------------------
Clib.remove() or Clib.system("del "...) should remove the file consistently.


Actual Behaviour:
--------------------
Removing the file fails randomly.


Steps:
--------------------

By following these steps the issue can be reproduced:

1. Execute a script that does the following steps:

vExcelApp = COMCreateObject("Excel.Application");
vExcelApp.Workbooks.Open(fileName);
...
vExcelApp.ActiveWorkbook.SaveAs(fileName);
vExcelApp.Application.Quit();
Clib.system("del " + fileName); // or Clib.remove(fileName);

2. Repeat until the error occurs.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms