HR, Payroll, Attendance Software Forums Lenvica HRMS Ask a Question Execution failed with error: SaveAs method of Workbook class failed

Viewing 2 reply threads
  • Author
    Posts
    • Ribin Luis
      Participant
      Post count: 33

      Hi,

      Good Morning!

      I am getting this error with automated excel reports. I've scheduled excel reports to be emailed to multiple users or save to my local drive.
      The scheduler history shows like: 'Execution failed with error: SaveAs method of Workbook class failed'

      Tried with Microsoft Office 2007, 2010, 2013 & 2016.

      Please suggest me how to solve this?


      Attachments:

    • Steve Alex
      Keymaster
      Post count: 130

      Hi Ribin,

      Greetings from Lenvica!

      This can occur if the directory you are trying to write to does not exist, or if you don't have write access to that directory. While you can "write" to files which don't previously exist (MATLAB will create them), the directory does need to exist beforehand.
      This can also happen in some situations where the user which starts the Excel is a system user. Excel expects the existence of the Desktop directory. To enable the command to work try the following:

      Create folder 'Desktop' in the following path:

          * For x64 processes create the following folder:
      C:\Windows\SysWOW64\config\systemprofile\Desktop

          * For x86 processes create the following folder:
      C:\Windows\System32\config\systemprofile\Desktop

    • Steve Alex
      Keymaster
      Post count: 130

      If task scheduler is not working and still showing the same error, follow the steps:

        * Open services and stop the service 'Lenvica HRMS Controller' if it's started
        * Select properties of service 'Lenvica HRMS Controller'
        * On tab 'Log On' change 'Local System account' to 'This account' and choose admin user and password
        * Start the service


      Attachments:

Viewing 2 reply threads
  • You must be logged in to reply to this topic.