开发者

Rename Excel Sheet Name in SSIS Package

SQL 2008 / VS 2008

I am exporting Excel Sheet to SQL Database. This package will be called from C# Application.

As the Sheet Name varies from Excel Sheet to Excel Sheet, Package fails. I have written a query inside the package as follows ..

select colum1,column2 from 'Sheet1$'

This Query exports data to SQL Databa开发者_Go百科se.

If i am able to rename the First Sheet Tab of the Excel Sheet as Sheet1, I will not be having any problem on Exporting to SQL DB.


The simplest solution is probably to use a Script Task to rename the sheet. Alternatively, you could write a Script Component to output the data directly from C# without altering the workbook or using SQL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜