question

earbash avatar image
earbash asked

Extract to multiple excel files with dynamic file naming

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
ssissql server 2012excel
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.