Click here to monitor SSC
SQLServerCentral is supported by Redgate
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: Monday, December 5, 2016 1:17 AM
Points: 14, Visits: 541
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: Yesterday @ 1:35 AM
Points: 15,510, Visits: 13,170
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 SQLKover.

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

Add to briefcase

Permissions Expand / Collapse