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

Exporting To Excel, No Column Headers Expand / Collapse
Author
Message
Posted Friday, October 4, 2013 4:51 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, May 12, 2014 8:57 AM
Points: 56, Visits: 290
Hi folks

Is it possible to export data to a blank excel file? When creating an excel destination, the transformation requires mappings to column headers. I simply want to tell the package to export the data to cell locations that I set in the Openrowset i.e. Sheet1$A1:A8, but unless there are column headers it won't work.
In a test excel file I create 2 column headers, in the same column on different rows e.g
A
1 Header1
2 xxxxxx
3
4 Header2
5 xxxxxx

However, I want to drop data into column B and C etc. Do I have to create column headers? It doesn't seem to be possible without them.
Post #1501524
Posted Friday, October 4, 2013 6:02 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Sunday, July 20, 2014 11:20 PM
Points: 13,252, Visits: 10,133
In the connection string you can indicate that there is no header line.
Set HDR=YES to HDR=NO.




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 #1501545
Posted Friday, October 4, 2013 6:32 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, May 12, 2014 8:57 AM
Points: 56, Visits: 290
I have it set to NO but it makes no difference
Post #1501557
Posted Friday, October 4, 2013 6:49 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Sunday, July 20, 2014 11:20 PM
Points: 13,252, Visits: 10,133
mitzyturbo (10/4/2013)
I have it set to NO but it makes no difference


You still have to map columns. SSIS needs fixed metadata.
If you have no header, the column names should be something like F1, F2, F3, ...




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 #1501564
Posted Friday, October 4, 2013 6:59 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, May 12, 2014 8:57 AM
Points: 56, Visits: 290
That's right Koen, the only mapping available in the metadata is F1, nothing that actually references the actual names of the headers that are in the file itself. I'm guessing its by design but I find it strange that it needs a header when the header value isn't in the column transformation GUI. But I guess that's the way that it works.
Post #1501571
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse