Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 533
  • Last Modified:

SSIS Export to Excel

I have 5 set of query

select * from Table1

select * from Table2

select * from Table3

select * from Table4

select * from Table5

At present, i export all the records to seperate spreadsheet. How to generate one excel file with multiple sheets for each set of query.

I can just copy and paste. On doing so, some TEXT Columns, Decimal COlumns are not properly copied. I feel it is safer to go through SQL Export to same excel file
0
chokka
Asked:
chokka
  • 3
  • 3
1 Solution
 
als315Commented:
You can use UNION query (if columns in all tables are same):
select * from Table1
UNION ALL
select * from Table2
UNION ALL
select * from Table3
UNION ALL
select * from Table4
UNION ALL
select * from Table5
0
 
chokkaAuthor Commented:
This will result in one Sheet.

I want one excel file with multiple sheets like Tab Menu
0
 
als315Commented:
Sorry, didn't read question carefully. Try this solution:
http://stackoverflow.com/questions/3891650/exporting-to-multiple-worksheets-using-ssis
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
chokkaAuthor Commented:
Unable to find  the solution.

If i am not wrong, using SSIS we will not be able to export multiple sheets or workbook on one spreadsheet.
0
 
chokkaAuthor Commented:
Not  the solution !!
0
 
als315Commented:
If it is not a solution, you should not mark question as answered. Press Request attention and ask to set your comment #38738313 as an answer.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now