This is a long one, i'm really just looking for some insight on what i'd need, and how tricky all this would be if you'd be so kind -

I've been asked to set up a scheduled task on a computer thats on 24 hours a day, that will run every 5 minutes and take information from our databases on staff performance on the factory floor.

At the moment the task runs some sql which outputs a .txt file every 3 minutes. It contains the date, and the amount of stock picked by each operative in that 3 minute period.

What i'd like to do is at a specific point during the day, take all of those .txt files and place them in a spreadsheet that would already be set up, in the correct tab. So if it was a Monday, tab 1, Tuesday tab 2 etc.

Ideally i'd like to make this as automated as possible so I didn't have to touch it once it was set up. If there was a way of setting up an automated macro that on a Sunday night would start a new version of the spreadsheet, add the date on the end, and move the previous weeks spreadsheet into an archived folder, that would also help a lot.

So that's my situation, basically. Any help would be appreciated here.