This is my first time on this forum. I will do my best to describe my question.
I have a table in my database called SerialExtract that has 4 fields. Productnumber, serialnumber, Constraint, Volume. What I need to do for my customer is load this data into an Excel workbook - where there is a tab (worksheet) for each Productnumber in my table, and the associated data for that product on that tab. The tabs need to be dynamic (since the productnumbers will change) - so that each time I run the load it refreshes the excel workbook.
Any suggestions on what type of tool I should use to accomplish this? My initial thoughts were to use SSIS or write a SPROC in SqlServer that can write to the Excel workbook. I can loop through the data by product - just not sure how to write to Excel with different tabs based on data.
thanks!
Barb
Submitted under: Microsoft SQL Server · Microsoft Excel · DBA · ·
Use dynamic sql with the code shown here http://beyondrelational.com/modules/2/blogs/70/posts/10792/importexport-to-excel.aspx