I currently use a cursor to iterate through a table selecting data to bcp out to various excel files and dynamically name the files as I go. The file names are constructed from data in the database.
All the files have different data, but have exactly the same column structure, and have just 1 worksheet each.
I want to use SSIS to do the export instead. I have got as far as using SSIS to export the data using separate queries/dataflows and hardcoding the file names etc. The problem is that I want to make it dynamic so that it can cope with any number of excel exports and file names.
This page shows brilliantly how to import multiple excel files dynamically, but I want to do the exact opposite!
https://stackoverflow.com/questions/7411741/how-to-loop-through-excel-files-and-load-them-into-a-database-using-ssis-package
I am using VS2015 & sql 2012
Any help that can be offered (with examples?) would be greatly appreciated
↧