I have some excel files in folder. i want pull the data into respective table ( here file name and data base table name are same), based on fine name pull the data into table.
1)meta data is diff each time and sheet names also different each time.
as per approach is
FOR EACH LOOP and execute sql task .
INSERT INTO yourtable SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\test\xltest.xls', 'SELECT * FROM [Customers$]') this is code in execute sql task.
my problems 1) i selected Fully qualified option in for each loop.
this returns like "C:\Documents and Settings\ADMIN\My Documents\Downloads\bcp\filenames.xls"
i want fetch the filename like" filenames "
from above directory .
2) each time sheet names also diff.
how can i identify the sheet name dynamically.
Finnaly my query is
INSERT INTO ? SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
View Complete Post