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
Posted Wednesday, July 6, 2011 12:17 AM


Group: General Forum Members
Last Login: Wednesday, March 11, 2015 9:04 AM
Points: 10, Visits: 394
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.

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



Group: General Forum Members
Last Login: Today @ 2:07 PM
Points: 14,159, Visits: 12,132
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