Search code examples
c#excelreporting

Auto generate excel file at specific time of the day


I have developed application in which I am creating some excel reports such as daily, weekly, monthly by making some database calls & using interop libraries.

Now I want to generate the same report at specific time of the day automatically and want to store the same in some folder.

I have few option as below

  1. Use timer and call the specific function every day for generating the file.
  2. Use windows service

Can any one please give me some inputs for the same.


Solution

  • The main advantage of a windows services is to work without need for an user to log in. But for this kind of need, the task scheduler is the way to go.