Forum Discussion
YMinaev
13 years agoStaff
Hi Lance,
What is drive F - is it a local or a mapped network drive? This error seems to come from Excel where some problems occur.
Also, how do you close Excel? If you do this by calling its Quit method, this may not work. There was a known error in Excel - while closing it from JScript, it didn't actually close. A workaround was to force garbage collection - assign null to the variable which holds a reference to Excel call the CollectGarbage function after Quit (this is a native JScript function).
Also, to make sure that Excel is actually closed before trying to obtain it via COM again, you can wait for it by using the Sys.WaitProcess method, and, if Excel exists, terminate it from script:
What is drive F - is it a local or a mapped network drive? This error seems to come from Excel where some problems occur.
Also, how do you close Excel? If you do this by calling its Quit method, this may not work. There was a known error in Excel - while closing it from JScript, it didn't actually close. A workaround was to force garbage collection - assign null to the variable which holds a reference to Excel call the CollectGarbage function after Quit (this is a native JScript function).
Also, to make sure that Excel is actually closed before trying to obtain it via COM again, you can wait for it by using the Sys.WaitProcess method, and, if Excel exists, terminate it from script:
...
var excel_process = Sys.WaitProcess("excel", 100);
if(excel_process.Exists) excel_process.Close(); // or .Terminate();
...
Related Content
- 8 months ago
- 2 years ago
- 5 years ago
Recent Discussions
- 2 days ago
- 3 days ago