Solved

Exporting from SQL Server to Excel

Posted on 2014-10-10
6
115 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

821 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