SSIS:截断Excel目的地
我正在创build一个SSIS包,用于将数据从SQL Server Source
到Excel Destination
。
如何在运行之前截断电子表格? 我尝试了以下的方式(使用Execute SQL Task
没有成功。
Jet提供程序不支持截断或删除命令 。 你有3个解决方法:
- 有一个空的excel模板,在运行数据stream之前克隆,或者
- 在运行数据stream之前,使用execute sql任务创build一个新的工作簿/选项卡
- 使用
Drop Table TableCall_Log
删除工作Drop Table TableCall_Log
并创build一个新Drop Table TableCall_Log
。 你可以参考这个链接了解更多细节。
有用的链接
- https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e26692b8-8044-4813-b643-0c181a1ea4fe/deleting-records-in-an-excel-sheet-using-ssis?forum=sqlintegrationservices
- http://www.rafael-salas.com/2006/12/import-header-line-tables-_116683388696570741.html?m=1
- https://dwhanalytics.wordpress.com/2011/04/07/ssis-dynamically-generate-excel-tablesheet/