Solved

Exporting from SQL Server to Excel

Posted on 2014-10-10
6
111 Views
Last Modified: 2014-10-20
Is it possible to export from SQL Server into a new Excel workbook and load the data into mult tabs.

From SQL Server
tbl1
tbl2
tbl3

Into Excel (1 workbook, multiple tabs)
tab1
tab2
tab3
0
Comment
Question by:upobDaPlaya
  • 2
  • 2
  • 2
6 Comments
 
LVL 25

Expert Comment

by:jogos
ID: 40374646
With openrowset you can choose your sheet, but that must be prepared to have all columns of right type already.
insert into OPENROWSET(
        'Microsoft.Jet.OLEDB.4.0', 
        'Excel 8.0;Database=d:\export\prebaredFile.xls;;HDR=YES', 
        'SELECT * FROM [Sheet1$]')
select * from yourtab1

Open in new window

More examples at
http://www.ashishblog.com/importexport-excel-xlsx-or-xls-file-into-sql-server/

There is the ability to import in your excel
http://sqlwithmanoj.com/2009/09/24/create-an-excel-refreshable-report-from-database-pivot-report/
0
 
LVL 3

Assisted Solution

by:prequel_server
prequel_server earned 200 total points
ID: 40381367
can be probably be done using SSIS, and/or SSRS. Interested in how?
0
 

Author Comment

by:upobDaPlaya
ID: 40387968
Whats involved using SSIS..would I need to load any special files on my computer ?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 25

Accepted Solution

by:
jogos earned 300 total points
ID: 40388069
0
 

Author Closing Comment

by:upobDaPlaya
ID: 40393504
Note sure what route I will head..Will first do some more research based on the information provided above..
0
 
LVL 3

Expert Comment

by:prequel_server
ID: 40393537
I would say SSIS is your best bet. You can make create multiple data flows all going to different sheets in one Excel workbook.  Post another question asking that specifically so we can help.

Cheers
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now