Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS - Excel - extract column names Expand / Collapse
Author
Message
Posted Wednesday, July 6, 2011 12:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Today @ 7:32 AM
Points: 3, Visits: 342
Hy everybody,

is it possible to get the column name from an excel sheet (e.g. in my Sheet are the Columns named test1, test2, test3) and insert the values in a table (sql server 2008)?

I need the column names as values for a dimension.

Thanks
Post #1137029
Posted Monday, July 11, 2011 3:01 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 13,532, Visits: 11,328
Sure.
In the Excel connection manager, change HDR=YES to HDR=NO. This means that the Exel file won't have a header row, so you read the first line as normal data. Use a conditional split to keep only the first line and discard everything else and then write the data to your dimension.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1139589
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse