Solved

How to Create(populate) a Excel from a SQL Table(dynamic columns) Using SSIS

Posted on 2009-07-08
6
388 Views
Last Modified: 2013-11-10
Hello Experts,

I have an requirement of transferring Data from a SQL table, where table columns can varried weekly.

I know clearly how we transfer data from SQL Table to Excel using SSIS. but as columns are changing i had to remap the links(mata data) when changes occur in SQL Table.

thanks in advance
Naveen

0
Comment
Question by:jainnaveen
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:rob_farley
ID: 24801545
Yeah - that's a problem. SSIS needs to know its metadata.

You may prefer another solution, such as running a stored procedure which gets you something like:

Field1 + ',' + Field2 + ',' + Field3

This will just be a single field, but you can dump that out to a Flat File and have it look like something that Excel can open.

It's a workaround... but it should work.

Rob
0
 
LVL 2

Author Comment

by:jainnaveen
ID: 24809406
Hi Rob,

It's not going to solve my problem.

As the business user's are not ready to open in excel and do any additional work of converting text to columns and so forth.,

Lets hope other experts come with any solutions ??

thanks anyway.
Naveen
0
 
LVL 15

Accepted Solution

by:
rob_farley earned 500 total points
ID: 24809901
Excel can open a CSV with no extra work - it should be just fine (and not require any extra work).

Try it - make yourself a .csv file that contains:

Field1,Field2,Field3
35,"Blah",7/8/2009
36,"Blah2",7/9/2009

...and see how it looks when you open it in Excel.

Rob
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 2

Author Comment

by:jainnaveen
ID: 24810462
O yeah Rob,

I never knew before that this would open perfectly. And i will try doing ths way but my concern is would any other limitations in doing so. as i have many coloumns(say 100)  and when add up all columns as a single string ...

I have no doubt treating your comment as solution but i rather wait to see any other solution to this..

thanks Rob.
Naveen
0
 
LVL 15

Expert Comment

by:rob_farley
ID: 24811408
I know it's just a workaround, but it may help you get around one of the biggest limitations with SSIS.

Rob
0
 
LVL 2

Author Closing Comment

by:jainnaveen
ID: 31600987
Hi Rob,
I guess no one have any other solution, Well your workaround solution has worked for me in couple of reports.
thankyou you
Naveen
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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

803 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