1

I am loading data from Excel Source to SQL Server destination. And it is working fine. The problem is the empty rows are also inserting into the database.

Can you help please. Thanks

2
  • Truncate the SQL Table -> For each loop container for sheets -> Data Flow Task -> Excel Source -> Derived Column -> Data Conversion -> OLEDB Destination (SQL Server). This is what im doing. I have 4 sheets, 2 sheets are loaded perfectly, remaining two sheets loading with all the rows 1048576... Commented Jun 18, 2013 at 10:53
  • Possibly it's Excel's fault. You can have some cells which look empty by Excel still registers them as non-empty. Clean up your sheets and try again: Option Explicit Sub DeleteBlanks() Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete End Sub If still NOK, let us (the community :) know Here's a better code for blanking empty cells: mrexcel.com/forum/excel-questions/… Commented Jun 18, 2013 at 11:03

2 Answers 2

1

Check the step 7 of article he has used conditional splits you can use something like that.

Sign up to request clarification or add additional context in comments.

1 Comment

I don't want to redirect any rows, I am having 147k rows as a set. But data is loading beyond this, there is no data after 147k row
1

You could try introducing a Script Component into your data flow task. Although they're based on the idea of "read a record, process it, write it", I believe you have the option of NOT writing out a particular record. You could filter based on whether the row from Excel has content, or not.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.