Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Skip rows in Excel using SSIS

Posted on 2010-09-14
6
Medium Priority
?
1,039 Views
Last Modified: 2013-11-10
I have an Excel file that I am using as my source to create a CGL file in SSIS. I need to skip the first 5 rows every time and only want data from the following columns. F6,F7,F5,F64,F10,F86,F11,F61,F63,F167,F125,F87,F2 is there an easy way to accomplish this task in SSIS?
weekly-batch.xls
0
Comment
Question by:mburk1968
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 41

Expert Comment

by:ralmada
ID: 33673678
you can use the OpenRowset() property on the Excel Datasource. Something like Sheet1$A6:Z5000, check this link for more details:
http://weblogs.asp.net/mikebosch/archive/2007/10/26/ssis-skipping-rows-and-stripping-subtotals.aspx 
0
 

Author Comment

by:mburk1968
ID: 33673788
I get the following error attached. this is what I placed in OpenRowSet: HeaderTemplate$A6:FK100
Error.docx
0
 
LVL 41

Expert Comment

by:ralmada
ID: 33673876
try adding brackets there
[HeaderTemplate$A6:FK100]
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Author Comment

by:mburk1968
ID: 33674003
Screen shot of error attached after using []
error.JPG
0
 
LVL 30

Accepted Solution

by:
Reza Rad earned 1000 total points
ID: 33674341
Easiest would be to give each row a number (a bit like an identity in SQL Server) and then use a conditional split to filter out everything where the number <=5

reference:
http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/97144bb2-9bb9-4cb8-b069-45c29690dfeb


0
 
LVL 41

Assisted Solution

by:ralmada
ralmada earned 1000 total points
ID: 33674595
Well, I'm not sure why the suggestion I given in the link on my first comment didn't work, but alternatively you can try this link:
http://www.sqlis.com/sqlis/post/Row-Number-Transformation.aspx 
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question