Wednesday, October 30, 2013

SSIS : Excel Header Issue

Problem:
Want to upload Excel file into SQL Server database. Excel file contains header and logo in the start. The Data with column header starts after some lines in excel. dont need these header data in my destination.
Solution:
SOL 1: There could be multiple solutions for this using script task and coding but there is very easy step in which you need to set hdr=yes in excel connection string.
This properties you can find in connection manager properties by hovering on connection string or copying it in notepad. by defualt you will see hdr=no.
SOL 2: There is one more solution where you can provide the range for excel columns which can be used for data in source. For this go to excel source , right click and click on Advance editor.
There you can select data access mode as openrowset and provide database as excel range from where you wanna select data leaving the header rows.

No comments:

Post a Comment