Import data from excel sheet
Hi All, I need to import data from an excel sheet and transform it and dump to DB. My concern is i want to start read data from 5th row from the excel. We can do this by using script component, but i need some simpler solution like querying from excel. Any suggestion/solution is highly appreciable. sarat chandra sahoo
November 26th, 2012 6:37am

Hi Sarat, It is possibel the selectively import the data from the excel source.What you need is to create some sort of scenario for the selectivity such as some sort of sl.no or something by which initital 4 rows are not part of that. Thanks Santhu
Free Windows Admin Tool Kit Click here and download it now
November 26th, 2012 3:50pm

hey, what is the 5th row? you can write select statement on OleDBsource component which the source is the excel Connection but still, what is the 5th row. just like if you do select query on table you can't know which row will come out first same here. So, if you can change the excel sheet by adding sequence number to it, you could use ConditionalSplit to check in which row are you and pass after the 5row to table. if not, you can insert into a table which has sequence number in it, then pull out from the table and use ConditionalSplit to count the rows. Last Option, but i don't know if it 100% work, is to put after the OleDbSource component, RowCount Component, and then inside the ConditionalSplit you can check the variable of the RowCoout. I think that i some cases it might work but because SSIS DataFlow works in buffers you can't always be for sure that he will count more then 5 (very fast) but he will pass the first 5. Gilad Plus, If you have any other identifier for those 5 row then you can check it on ConditionalSplit. If this answer is the right one - please Mark it :-)
November 26th, 2012 4:02pm

Hi Santhu, I don't have any permission to do changes in the excel. What i can do that i can select data from 5th row. Above the rows contains header and it will be different for different scenario. I don't want to write any script task for it.sarat chandra sahoo
Free Windows Admin Tool Kit Click here and download it now
November 26th, 2012 4:04pm

Select One Excel Source In ur Package ---> select excel file as Source And write down Select Statement (SQL command)--> Select * from [yourTabname$A5:A10]----> it will select one column i.e"A" from row 5 to 10---> A5 will be your Column name you can give range if you want to select more then one column Select * from [yourTabname$A5:C10]----> it will select three column i.e"A, B & C" from row 5 to 10---> A5,B5&C5 will be your Column name
November 26th, 2012 5:26pm

Hi sarat, What i meant by create scenario is that u need not modify the excel sheet.U need to devise some sort of scene for the where clause in a query so that first four rows are not part of the result set. Thanks Santhu
Free Windows Admin Tool Kit Click here and download it now
November 26th, 2012 5:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics