Hi Guys,
I am working on a report which is to be called from a DTS package in SQL Server 2000 and populated with data.
A stored proc is called which populates data for each year (1st Oct - 30th Sep) - 2 tables hold the information for each year. Each of these tables represents a worksheet on my template.
The query is a simple select statement and dump into the worksheet for each tab and each worksheet follows the same format.
Based upon the date the template is called I need to be able to carry out the following;
1. Add and name the correct number of worksheets
2. Dynamically construct the SQL query to query the correct table and place the recordset on the correct worksheet.
As all the tables follow the same naming conventions my first thoughts were to run these table names into an array within excel - after this I am at a loss!!
Thanks all!
I am working on a report which is to be called from a DTS package in SQL Server 2000 and populated with data.
A stored proc is called which populates data for each year (1st Oct - 30th Sep) - 2 tables hold the information for each year. Each of these tables represents a worksheet on my template.
The query is a simple select statement and dump into the worksheet for each tab and each worksheet follows the same format.
Based upon the date the template is called I need to be able to carry out the following;
1. Add and name the correct number of worksheets
2. Dynamically construct the SQL query to query the correct table and place the recordset on the correct worksheet.
As all the tables follow the same naming conventions my first thoughts were to run these table names into an array within excel - after this I am at a loss!!
Thanks all!