0
votes

I got a problem in scheduled agent in lotus script while opening csv workbook.It simply opens workbook from Excel and reads the data.

It works perfectly fine when I run manually. It throws when schedule at workbooks.open line.

Agents Settings : Allow resticted operations with full admin rights.

Code :

Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = False
xlApp.DisplayAlerts = False
Print "New filepath=" & filepath
xlApp.Workbooks.Open filepath   ' Open the CSV file
Set xlWorkbook = xlApp.ActiveWorkbook
Set xlSheet = xlWorkbook.ActiveSheet

filepath=C:\Temp\transit_15102008.csv

Error thrown at log.nsf

printing: ERROR : Transfer Files agent- Microsoft Office Excel: Microsoft Office Excel cannot access the file 'C:\Temp\transit_15102008.csv'. There are several possible reasons:

• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook. at line-55

There is only one worksheet in the Excel.

I am not able to figure out the issue. Please somebody help me to resolve. Thanks in advance.

1
Did you install MS Office on your Domino Server?Torsten Link
Ms office 2007 Installed on the widows server2008 (Domino 8.5.2). In fact I am taking remote of the server and running it manually. It works fine. It is scheduled on same machine only. But throws above error.Vijayakumar
I have the same problem. Did you find a solution?Casper Skovgaard

1 Answers

1
votes

When you run your agent manually, it runs in your workstation context where (I assume) there is MS Office installed.

But when your agent runs as scheduled, it runs in the server context, and if you don't have MS Office installed on the server, or there's no file on the path: C:\Temp\transit_15102008.csv on the server, then your agent fails.

Solution:

  1. Make sure you have MS Office properly installed on the server where your scheduled agent runs.

  2. Make sure that there is file present on the path C:\Temp\transit_15102008.csv on your server where your scheduled agent runs.