title: getting error while opening excel workbook in scheduled agent
body: <p>I got a problem in scheduled agent in lotus script while opening csv workbook.It simply opens workbook from Excel and reads the data.</p>
  
  <p>It works perfectly fine when I run manually. It throws when schedule at workbooks.open line.</p>
  
  <p>Agents Settings : Allow resticted operations with full admin rights.</p>
  
  <p>Code : </p>
  
  <pre><code>Set xlApp = CreateObject("Excel.Application")
  xlApp.Visible = False
  xlApp.DisplayAlerts = False
  Print "New filepath=" &amp; filepath
  xlApp.Workbooks.Open filepath   ' Open the CSV file
  Set xlWorkbook = xlApp.ActiveWorkbook
  Set xlSheet = xlWorkbook.ActiveSheet
  </code></pre>
  
  <p>filepath=C:\Temp\transit_15102008.csv</p>
  
  <p>Error thrown at log.nsf</p>
  
  <pre><code>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
  </code></pre>
  
  <p>There is only one worksheet in the Excel.</p>
  
  <p>I am not able to figure out the issue.  Please somebody help me to resolve. Thanks in advance.</p>