2013-03-20 77 views
0

我是SSIS的新手,我想从sql表中生成一个excel文件。如何使用SSIS从sql表中生成excel文件?

SQL表:MYDATA

Id date  value 
1  2013-02-2 236823 
2  2013-02-3 185454 

现在我需要生成和Excel文件,这将让我像

datevalue

我如何可以生成的输入Excel中文件?

请给我任何线程那将是很大的帮助。

我试图做启动data flow task

里面我已经采取ole db source写SQL查询select date ,value from mydata

然后加入Excel destination

但它给我的Excel目标的错误:

external table is not in expected format 
+1

检查这篇文章http://cansmansblog.wordpress.com/2009/04/17/ssis-export-data-from-sql-server-2005-to-excel/ – praveen 2013-03-20 16:29:20

+0

Excel连接管理器部分丢失? 我收到一个错误'擅长destination':'是不是预期format' – Neo 2013-03-20 16:34:52

+0

外部表是您的Excel'打开file'或rü使用任何'password'保护的文件? – praveen 2013-03-20 16:39:39

回答

1

我的朋友,你尝试过这么远吗? 这是一个简单的点击点击的东西。下次,请分享您的努力。 这是指导:

1. Place a DFT on the Control Flow surface 
2. Double-click on the DFT to enter into the Data Flow surface 
3. Place an OLE DB Source. Double-click on it. Click on New... button and create a new OLE DB connection manager 
4. Data access mode: Table or view. Select your table 
5. Click on the columns. Select the fields you want. 
6. Now place an Excel Destination. Connect it to the OLE DB Source. 
7. Double-click and click on New... button. Give the Excel file path where you want to dump the data. 
8. Click on New.. Some warning will appear. Accept it. 
9. Select the Name of the Excel sheet from the drop down. 
10. Run the package. 

这是普通的香草解决方案。一旦你了解了基础知识,请翻译你的解决方案。例如,考虑通过变量设置连接。

祝你好运!

相关问题