sql server - SSIS Excel definite cell with rows -
i have excel spreadsheet this:
c1 - 100100 g1 - 01.01.2015 h1 - 15.05.2015
from a5:
id animal sales 123123 bear 100 213213 zebra 200 321321 lion 150
and need move data sql server database using ssis. resulting table should like
id animal sales date1 date2 region 123123 bear 100 01.01.2015 15.05.2015 100100 213213 zebra 200 01.01.2015 15.05.2015 100100 321321 lion 150 01.01.2015 15.05.2015 100100
any appreciated.
the way have handled problem in past to:
- define 2 excel connection managers, 1 firstrowhascolumnname true , 1 false.
- create excel source, use first connection manager, , point rowset tablename$a5:zz,
- create 3 more excel sources point rowsets tablename$c1:c1, tablename$g1:g1, , tablename$h1:h1
- add derived column each of these, set it, , union based on derived column. original source well.
when doing had problems metadata column names c1, g1, , h1 sources, took fiddling work.
hope helps.
Comments
Post a Comment