Maybe (just to get something back)
for d in (select trunc(sysdate) - 15 + level the_day
connect by level <= 10
I Would like to know how to loop through the days so that I get every week on a different sheet
Huh? Oracle does NOT have 'sheets'.
Explain, in English, what you are trying to do. Describe EVERY step and what you want to happen at each step and what the final result should be.
Include a small amount of sample data.
Sorry, you didn't mention it in your original post, so I thought the database being somehow involved, but now it seems it is not.
It's been several years already I'm doing exclusively database programming and I don't even remember the last YAFET (Yet Another Front End Technology) used, nevertheless, I'm pretty confident it can all be done within Excel.