I'm trying to create an SSIS package that executes a stored procedure that returns a detailed data set (i.e. all sales from this month). I want to put the data into an Excel worksheet with 2 tabs - one for the detail of each purchase and one with a summary by product.
After I get the detailed data from the stored procedure, I used a "Multicast" step. One branch of the multicast sends the detailed data to the "Details$" tab, and the other branch uses an Aggregate task to compute the totals by product and then send it to the "Summary$" tab.
The package runs successfully, but when I open my Excel file, there are a handful of rows on the wrong worksheet scattered throughout the sheet (a few summary rows on the detail tab, and a few detail rows on the summary tab).
At first, I only had one Excel Connection to the file, which I thought should work since the sheet name is specified in the Excel Destination rather than the connection. I tried creating 2 separate connection managers, but it didn't solve the problem.
I'm considering giving up and just having 2 separate data flows (and executing the stored procedure twice), but I don't understand why I'm having this problem in the first place. Has anyone ever encountered something similar?