Ok, this is going to be one of the dumber questions you see here.
I am trying to write a little script that will export stuff from SQL Server to an existing Excel 2013 workbook into multiple sheets. I can't use the menu system because I am asked to make a lot of really dumbly repetitive tables as one-offs (think 10 workbooks A-J with 50 sheets, one table each for years 1950 through 1999 all formatted the same so a robot posing as a human can browse through reams of data at their leisure (or not)) so I am trying to minimize my pain.
I really have a hard time figuring out the "getting started" part of any sort of programming activity, which is where one tends not to have the vocabulary to look for what one is missing. 99% of my SQL experience is select statements so I don't know where to do the thing.
I see that I can do things like
insert into OPENROWSET(.....
and
create procedure proc_generate_excel_with_columns(.....
but where do you do these things at in SQL Server (2008)? Can you just stick these at the end of a query and hit execute?
P.S. how do you pick a specific sheet?
I am trying to write a little script that will export stuff from SQL Server to an existing Excel 2013 workbook into multiple sheets. I can't use the menu system because I am asked to make a lot of really dumbly repetitive tables as one-offs (think 10 workbooks A-J with 50 sheets, one table each for years 1950 through 1999 all formatted the same so a robot posing as a human can browse through reams of data at their leisure (or not)) so I am trying to minimize my pain.
I really have a hard time figuring out the "getting started" part of any sort of programming activity, which is where one tends not to have the vocabulary to look for what one is missing. 99% of my SQL experience is select statements so I don't know where to do the thing.
I see that I can do things like
insert into OPENROWSET(.....
and
create procedure proc_generate_excel_with_columns(.....
but where do you do these things at in SQL Server (2008)? Can you just stick these at the end of a query and hit execute?
P.S. how do you pick a specific sheet?