Unable to save Excel sheet in Task Scheduler. RRS feed

  • Question

  • Hello,

    I am facing with the issue while saving the excel sheet.

    I am creating the new Excel sheet in C# console application and saving it on disk and attaching it to mail.

    Every thing works fine when I am running from my visual studio, but when I register the application (.exe file with app.config) I do not see the excel sheet saved. Though the statement

    Worksheet.SaveAs(....); executes without any exception.

    Can any one help me here to solve this problems.



    Friday, August 15, 2014 10:45 PM

All replies

  • Hi,

    According to your description, I think you scheduled the custom .exe file to run at a time in Task Scheduler. Since the workbook can be saved successfully when running from VS, I suggest you running the .exe file directly instead of in the Task Scheduler. If it can save the Excel workbook, I think the issue may be related to Task Scheduler.

    By the way, don't forget to make the scheduled task run under a user credential.                

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, August 18, 2014 3:11 AM
  • It's probably a permissioning issue.  Make sure you have the right password too!  If you don't have the right password for the Windows Scheduler, it will NOT work.

    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Wednesday, August 20, 2014 1:01 PM