Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I export multiple tables from SQL server into multiple Excel files using for each loop. For example... i have 2 tables employer and department. I want to export them to employer.xls and department.xls.

I have 100s of files to perform similar exports using SSIS from SQL server DB. Please guide me. My destination is Excel 2010.
Posted
Comments
PIEBALDconsult 5-Aug-14 13:19pm    
I've only been using SSIS for a couple of years so far, and only writing to Excel a few times, and I can't think of a way to do that.
I would write a console utility or, at most, a Script Task in SSIS to do it.

Perhaps you should more clearly specify what you are trying to do and why you are trying to do it.
Bear in mind that an SSIS package, once written, is very rigid.

1 solution

See SSIS Packages Run using Command Line at
http://www.excel-sql-server.com/sql-server-export-to-excel-using-ssis.htm[^]

You may easily configure steps to repeat exporting.

But in any case you should prepare SSIS packages for every table.

You may use simpler way.

Just export your tables into CSV files, then open them in Excel and save them as an Excel workbooks using automation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900