Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Trouble with Excel destination Config. Manager

Author  Topic 

VM77
Starting Member

1 Post

Posted - 2010-11-20 : 00:02:26

Hi....Im new to SSIS and i ve been battling with this issue for a while...What my package needs to do is , create an Excel sheet dynamically when the package runs , then query some data from SQL Server , load that data into into the Excel and then rename the excel .
I use an Execute SQL task to create an Excel dynamically(it contains the query to create the Excel- the table name and columns ) and it works fine . After the Execute SQL task , i ve added a data flow task , which contains an OLEDB Source and Excel Destination with a Data Conversion task inbetween , to convert the data types from non unicode to unicode. I ve written the query in the OLEDB source to query the data from SQL . Im having trouble mapping that data to the Excel destination task .Im not able to configure the connection manager in my Excel destination task . I have an OLEDB Connection manager for the OLEDB task and an Excel Connection Manager For the Excel Destination task. The Excel Connection Manager contains the path where the Excel has to be created. How do i map columns returned from the SQL query in the Excel Destination task for a dynamically created Excel?
Does anyone have any ideas about how this can be done?

Yalini2212
Starting Member

12 Posts

Posted - 2010-11-20 : 03:24:15
1.First create excel sheet in your machine. You can have a excecute sql task, in which you can delete the table with data which exists already in the excel.
2.Use another excecute sql task and create table again.(it will delete and create new one)
3. have a data flow task, in which oledb source and excel destination (which is pointing to the location in which we created table in step 2). When connecting go to mappings and select the excel fields you want.
4. You cannot map the excel fields which you have not created in the system.
So better create excel, while connecting, Select first row has column names and try.
Go to Top of Page
   

- Advertisement -