Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS Data Flow with 2 Excel Destinations (2 sheets in same workbook) - some rows going to the wrong sheet

$
0
0


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?


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>