Reputation: 1559
I am trying to export SQL data into template excel using SSIS. My template looks as below:
My SQL code returns data as:
In SSIS in the excel destination not all the columns of my template are showing in the 'Column mapping' section. I can only see 'F1, F2, F3..' in the setting section. Screenshot as below:
Why are the cells A7, B7, C7,..etc are not showing in the column mapping section? any help on how this can be fixed?
Upvotes: 2
Views: 1142
Reputation: 37313
In the Excel destination editor, use Change the Access mode to SQL Command
and use the following query:
SELECT * FROM [Sheet1$A6:D6]
Where A6
is pointing to the 6th row where columns header are located and D6
is that cells where the last column header is located (D
> column index, 6
> 6th row)
This will solve the column header problem, but it will still insert data from the first row, there are many workarounds provided in the following topic:
Upvotes: 1