Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-03-05 : 11:58:42
|
I really really need help with this. I've been stuck on the same issue for days now.Basically i have 6 excel files which i need to loop through.Each excel file has 1 sheet each but the sheet names are different.EG: Sheet1, Sheet2, IRE, ....I need to be able to loop through all these 6 files and read the data of these sheets and insert into 1 table. I am able to loop through if the sheet names are the same, but not when the sheet name changes. I am loading the data into 1 sql server table. |
|
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-03-06 : 08:17:19
|
Somebody please help me. How do i loop around Excel files and insert the data into sql table.if i set the table and view in the datasource to variable it errors. I need help. |
 |
|
sgandhi
Posting Yak Master
115 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-07 : 14:05:04
|
http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx |
 |
|
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-03-09 : 07:55:07
|
This works on looping thorugh files, but if the sheet name is different, then it doesnt work? |
 |
|
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-03-09 : 13:50:36
|
I really really need help with this. I've been stuck on the same issue for days now.Basically i have 6 excel files which i need to loop through.Each excel file has 1 sheet each but the sheet names are different.EG: Sheet1, Sheet2, IRE, ....I need to be able to loop through all these 6 files and read the data of these sheets and insert into 1 table. I am able to loop through if the sheet names are the same, but not when the sheet name changes. I am loading the data into 1 sql server table. |
 |
|
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-03-09 : 15:16:22
|
Solution found. A loop with in a loop solved this problem |
 |
|
|
|
|