How to create an Excel automatically with Windows Scheduler
How to create an Excel automatically with Windows Scheduler
Our client wants to create an Excel file by day end by running a LANSA program with Windows Scheduler. However, from my understanding, only a function can be run without user interface but Excel Active-X control cannot be used in a function. I would like to seek advice from anyone who has other idea of accomplishing this. Thanks.
-
LANSAfolks
- Posts: 49
- Joined: Thu Oct 10, 2019 9:32 am
Re: How to create an Excel automatically with Windows Scheduler
Save whatever you want as a .csv file and excel will already be associated as the default application to that file format?
Then use OV_SYSTEM_SERVICE to start the application you need.
Then use OV_SYSTEM_SERVICE to start the application you need.
Re: How to create an Excel automatically with Windows Scheduler
some ideas:
1) if you have LANSA Integrator, use the EXCELSERVICE to create the excel from a function. If you are in V15, and we are talking a Visual LANSA station, you may already have LANSA Integrator EXCELSERVICE available in that desktop workstation.
2) if you want to use the activex, you can have a form running (sleeping, timer control) all day in the background. when the task schedule starts the task, it calls a lansa function that turn on the switch, let's say, a flag in a file. the form wakes up every x minutes, notes that the switch is on and creates the excel using the activex. off course, you could have the sleeping form start working when the time = hh:mm:ss and dont use the task scheduler at all.
3) I like the previous idea of the csv as well.
1) if you have LANSA Integrator, use the EXCELSERVICE to create the excel from a function. If you are in V15, and we are talking a Visual LANSA station, you may already have LANSA Integrator EXCELSERVICE available in that desktop workstation.
2) if you want to use the activex, you can have a form running (sleeping, timer control) all day in the background. when the task schedule starts the task, it calls a lansa function that turn on the switch, let's say, a flag in a file. the form wakes up every x minutes, notes that the switch is on and creates the excel using the activex. off course, you could have the sleeping form start working when the time = hh:mm:ss and dont use the task scheduler at all.
3) I like the previous idea of the csv as well.
Re: How to create an Excel automatically with Windows Scheduler
Thanks a lot for the suggestions.